Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Remove lines of commented code spotted by sonar.
authorArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 4 Oct 2017 16:43:57 +0000 (18:43 +0200)
committerArnaud Giersch <arnaud.giersch@univ-fcomte.fr>
Wed, 4 Oct 2017 20:58:26 +0000 (22:58 +0200)
41 files changed:
examples/java/app/bittorrent/Connection.java
examples/java/app/bittorrent/Peer.java
examples/java/cloud/masterworker/Master.java
examples/java/cloud/migration/XVM.java
examples/java/dht/chord/Node.java
examples/smpi/mc/only_send_deterministic.c
src/bindings/java/jmsg_process.cpp
src/bindings/java/jtrace.cpp
src/kernel/context/ContextRaw.cpp
src/kernel/routing/TorusZone.cpp
src/mc/ChunkedData.cpp
src/mc/ObjectInformation.cpp
src/mc/PageStore.cpp
src/mc/RegionSnapshot.cpp
src/mc/checker/CommunicationDeterminismChecker.cpp
src/mc/compare.cpp
src/mc/mc_dwarf.cpp
src/mc/mc_request.cpp
src/mc/mc_smx.cpp
src/mc/mc_unw.cpp
src/mc/mc_unw_vmread.cpp
src/msg/msg_io.cpp
src/msg/msg_vm.cpp
src/plugins/vm/VirtualMachineImpl.cpp
src/simdag/sd_global.cpp
src/simix/popping.cpp
src/simix/smx_network.cpp
src/simix/smx_synchro.cpp
src/smpi/internals/smpi_bench.cpp
src/surf/lagrange.cpp
src/surf/maxmin.cpp
src/xbt/config.cpp
src/xbt/cunit.cpp
src/xbt/dict.cpp
src/xbt/dynar.cpp
src/xbt/log.c
src/xbt/mallocator.c
src/xbt/memory_map.cpp
src/xbt/swag.c
src/xbt/xbt_log_appender_file.c
teshsuite/surf/maxmin_bench/maxmin_bench.cpp

index 668283a..1bd47eb 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -32,7 +32,6 @@ public class Connection {
   // Add a new value to the peer speed average
   public void addSpeedValue(double speed) {
     peerSpeed = peerSpeed * 0.55 + speed * 0.45;
   // Add a new value to the peer speed average
   public void addSpeedValue(double speed) {
     peerSpeed = peerSpeed * 0.55 + speed * 0.45;
-    // peerSpeed = (peerSpeed * messagesCount + speed) / (++messagesCount);    
   }
 
   @Override
   }
 
   @Override
index 94d0a68..43be4d4 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2006-2014, 2016. The SimGrid Team.
+/* Copyright (c) 2006-2014, 2016-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -384,14 +384,12 @@ public class Peer extends Process {
     if (currentPieces.size() >= (Common.FILE_PIECES - pieces)) {
       return;
     }
     if (currentPieces.size() >= (Common.FILE_PIECES - pieces)) {
       return;
     }
-//    if (pieces < 3) {
-      do {
-        currentPiece = stream.randInt(0,Common.FILE_PIECES - 1);
-      } while (!(bitfield[currentPiece] == '0' && !currentPieces.contains(currentPiece)));
-//    }
-//    else {
-      //TODO trivial min algorithm.
-//    }
+
+    //TODO: trivial min algorithm when pieces >= 3
+    do {
+      currentPiece = stream.randInt(0,Common.FILE_PIECES - 1);
+    } while (!(bitfield[currentPiece] == '0' && !currentPieces.contains(currentPiece)));
+
     currentPieces.add(currentPiece);
     Msg.debug("New interested piece: " + currentPiece);
     assert currentPiece >= 0 && currentPiece < Common.FILE_PIECES;
     currentPieces.add(currentPiece);
     Msg.debug("New interested piece: " + currentPiece);
     assert currentPiece >= 0 && currentPiece < Common.FILE_PIECES;
index ea80d77..b005c1f 100644 (file)
@@ -55,16 +55,6 @@ public class Master extends Process {
                        Msg.verb("Sleep long enough for everyone to be done with previous batch of work");
                        waitFor(1000*step - Msg.getClock());
 
                        Msg.verb("Sleep long enough for everyone to be done with previous batch of work");
                        waitFor(1000*step - Msg.getClock());
 
-                       /*    Msg.info("Add one more process per VM.");
-    for (int i = 0; i < vms.size(); i++) {
-      VM vm = vms.get(i);
-      Worker worker = new Worker(vm,i + vms.size());
-      worker.start();
-    }
-
-    workBatch(workersCount * 2);
-                        */
-
                        Msg.verb("Migrate everyone to "+hosts[3].getName());
                        for (VM vm : vms) {
                                Msg.verb("Migrate "+vm.getName()+" to "+hosts[3].getName());
                        Msg.verb("Migrate everyone to "+hosts[3].getName());
                        for (VM vm : vms) {
                                Msg.verb("Migrate "+vm.getName()+" to "+hosts[3].getName());
index ded5e44..414c980 100644 (file)
@@ -28,7 +28,6 @@ public class XVM extends VM {
   public void setLoad(int load){  
     if (load >0) {
       this.setBound(this.getSpeed()*load/100);
   public void setLoad(int load){  
     if (load >0) {
       this.setBound(this.getSpeed()*load/100);
-      //    this.getDaemon().setLoad(load);
       daemon.resume();
     } else{
       daemon.suspend();
       daemon.resume();
     } else{
       daemon.suspend();
index 2ef023c..94e8112 100644 (file)
@@ -332,7 +332,6 @@ public class Node extends Process {
   // Performs a find successor request to a random id.
   private void randomLookup() {
     int dest = 1337;
   // Performs a find successor request to a random id.
   private void randomLookup() {
     int dest = 1337;
-    //Msg.info("Making a lookup request for id " + dest);
     findSuccessor(dest);
   }
 
     findSuccessor(dest);
   }
 
index 8c9108c..34aca4c 100644 (file)
@@ -1,6 +1,6 @@
 /* ../../../smpi_script/bin/smpirun -hostfile hostfile_send_deterministic -platform ../../platforms/cluster.xml -np 3 --cfg=smpi/send-is-detached-thresh:0 gdb\ --args\ ./send_deterministic */
 
 /* ../../../smpi_script/bin/smpirun -hostfile hostfile_send_deterministic -platform ../../platforms/cluster.xml -np 3 --cfg=smpi/send-is-detached-thresh:0 gdb\ --args\ ./send_deterministic */
 
-/* Copyright (c) 2009-2015. The SimGrid Team.
+/* Copyright (c) 2009-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -33,15 +33,11 @@ int main(int argc, char **argv)
   }
 
   if (rank == 0) {
   }
 
   if (rank == 0) {
-    //printf("MPI_ISend / MPI_IRecv Test \n");
-
     for (int i = 0; i < size - 1; i++) {
       MPI_Recv(&recv_buff, 1, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
     for (int i = 0; i < size - 1; i++) {
       MPI_Recv(&recv_buff, 1, MPI_INT, MPI_ANY_SOURCE, MPI_ANY_TAG, MPI_COMM_WORLD, &status);
-      //printf("Message received from %d\n", recv_buff);
     }
   }else{
     MPI_Send(&rank, 1, MPI_INT, 0, 42, MPI_COMM_WORLD);
     }
   }else{
     MPI_Send(&rank, 1, MPI_INT, 0, 42, MPI_COMM_WORLD);
-    //printf("Sent %d to rank 0\n", rank);
   }
 
   MPI_Finalize();
   }
 
   MPI_Finalize();
index 000d1d4..ec8c032 100644 (file)
@@ -217,13 +217,6 @@ JNIEXPORT void JNICALL Java_org_simgrid_msg_Process_sleep(JNIEnv *env, jclass cl
   if (rv != MSG_OK) {
     XBT_DEBUG("Something during the MSG_process_sleep invocation was wrong, trigger a HostFailureException");
 
   if (rv != MSG_OK) {
     XBT_DEBUG("Something during the MSG_process_sleep invocation was wrong, trigger a HostFailureException");
 
-    //jmsg_throw_status(env,rv);
-
-    // adsein, the code above as been replaced by the code below. Indeed, according to the documentation, a sleep can only
-    // trigger a host_failure exception. When the sleep crashes due to a host shutdown, the exception thrown by smx_context_java.c
-    // is a cancelled_error, see bindings/java/smx_context_java.c, function void smx_ctx_java_stop(smx_context_t context) and src/msg/msg_gos.c
-    // function  msg_error_t MSG_process_sleep(double nb_sec)
-
     jxbt_throw_host_failure(env, "");
   }
 }
     jxbt_throw_host_failure(env, "");
   }
 }
index c33ba63..667c7b4 100644 (file)
@@ -178,16 +178,25 @@ JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSet
   env->ReleaseStringUTFChars(jvar, variable);
 }
 /* Missing calls
   env->ReleaseStringUTFChars(jvar, variable);
 }
 /* Missing calls
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableAdd (JNIEnv *, jclass, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableSub (JNIEnv *env, jclass cls, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableSetWithTime (JNIEnv *, jclass, jdouble, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableAddWithTime (JNIEnv *, jclass, jdouble, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableSubWithTime (JNIEnv *, jclass, jdouble, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableAdd (JNIEnv *, jclass, jstring, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSub (JNIEnv *, jclass, jstring, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSetWithTime (JNIEnv *env, jclass cls, jdouble, jstring, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcdstVariableAddWithTime (JNIEnv *env, jclass cls, jdouble, jstring, jstring, jstring, jdouble);
-JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSubWithTime (JNIEnv *env, jclass cls, jdouble, jstring, jstring, jstring, jdouble);
+   JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableAdd(JNIEnv *, jclass, jstring, jstring, jdouble)
+   JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableSub(JNIEnv *env, jclass cls, jstring, jstring,
+                                                                       jdouble)
+   JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableSetWithTime(JNIEnv *, jclass, jdouble, jstring,
+                                                                               jstring, jdouble)
+   JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableAddWithTime(JNIEnv *, jclass, jdouble, jstring,
+                                                                               jstring, jdouble)
+   JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkVariableSubWithTime(JNIEnv *, jclass, jdouble, jstring,
+                                                                               jstring, jdouble)
+   JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableAdd(JNIEnv *, jclass, jstring, jstring,
+                                                                             jstring, jdouble)
+   JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSub(JNIEnv *, jclass, jstring, jstring,
+                                                                             jstring, jdouble)
+   JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSetWithTime(JNIEnv *env, jclass cls, jdouble,
+                                                                                     jstring, jstring, jstring, jdouble)
+   JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcdstVariableAddWithTime(JNIEnv *env, jclass cls, jdouble,
+                                                                                     jstring, jstring, jstring, jdouble)
+   JNIEXPORT void JNICALL Java_org_simgrid_trace_Trace_linkSrcDstVariableSubWithTime(JNIEnv *env, jclass cls, jdouble,
+                                                                                     jstring, jstring, jstring, jdouble)
 */
 
 SG_END_DECL()
 */
 
 SG_END_DECL()
index 244fdd4..8e83fa5 100644 (file)
@@ -270,7 +270,7 @@ RawContextFactory::RawContextFactory()
     raw_workers_context = xbt_new(RawContext*, nthreads);
     raw_maestro_context = nullptr;
 #endif
     raw_workers_context = xbt_new(RawContext*, nthreads);
     raw_maestro_context = nullptr;
 #endif
-    // TODO, if(SIMIX_context_get_parallel_threshold() > 1) => choose dynamically
+    // TODO: choose dynamically when SIMIX_context_get_parallel_threshold() > 1
   }
 }
 
   }
 }
 
index b3b83df..75bd500 100644 (file)
@@ -64,8 +64,8 @@ void TorusZone::create_links_for_node(ClusterCreationArgs* cluster, int id, int
       linkDown = linkUp;
     }
     /*
       linkDown = linkUp;
     }
     /*
-     * Add the link to its appropriate position;
-     * note that position rankId*(xbt_dynar_length(dimensions)+has_loopback?+has_limiter?)
+     * Add the link to its appropriate position.
+     * Note that position rankId*(xbt_dynar_length(dimensions)+has_loopback?+has_limiter?)
      * holds the link "rankId->rankId"
      */
     privateLinks_.insert({position + j, {linkUp, linkDown}});
      * holds the link "rankId->rankId"
      */
     privateLinks_.insert({position + j, {linkUp, linkDown}});
index b60f938..c3a6357 100644 (file)
@@ -38,17 +38,15 @@ ChunkedData::ChunkedData(PageStore& store, AddressSpace& as,
       xbt_assert(simgrid::mc::mmu::split(page.address()).second == 0,
         "Not at the beginning of a page");
 
       xbt_assert(simgrid::mc::mmu::split(page.address()).second == 0,
         "Not at the beginning of a page");
 
-        /* Adding another copy (and a syscall) will probably slow things a lot.
-           TODO, optimize this somehow (at least by grouping the syscalls)
-           if needed. Either:
-            - reduce the number of syscalls;
-            - let the application snapshot itself;
-            - move the segments in shared memory (this will break `fork` however).
-        */
-
-        as.read_bytes(
-          buffer.data(), xbt_pagesize, page,
-          simgrid::mc::ProcessIndexDisabled);
+      /* Adding another copy (and a syscall) will probably slow things a lot.
+         TODO, optimize this somehow (at least by grouping the syscalls)
+         if needed. Either:
+         - reduce the number of syscalls
+         - let the application snapshot itself
+         - move the segments in shared memory (this will break `fork` however)
+      */
+
+      as.read_bytes(buffer.data(), xbt_pagesize, page, simgrid::mc::ProcessIndexDisabled);
 
       pagenos_[i] = store_->store_page(buffer.data());
 
 
       pagenos_[i] = store_->store_page(buffer.data());
 
index 015a60b..78d557f 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2014-2015. The SimGrid Team.
+/* Copyright (c) 2014-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -17,7 +17,7 @@ namespace mc {
 
 /* For an executable object, addresses are virtual address
  * (there is no offset) i.e.
 
 /* For an executable object, addresses are virtual address
  * (there is no offset) i.e.
- * \f$\text{virtual address} = \{dwarf address}\f$;
+ * \f$\text{virtual address} = \{dwarf address}\f$
  *
  * For a shared object, the addreses are offset from the begining
  * of the shared object (the base address of the mapped shared
  *
  * For a shared object, the addreses are offset from the begining
  * of the shared object (the base address of the mapped shared
index a2e4993..b258b16 100644 (file)
@@ -155,9 +155,9 @@ std::size_t PageStore::store_page(void* page)
   xbt_assert(top_index_ <= this->capacity_, "top_index is not consistent");
 
   // First, we check if a page with the same content is already in the page store:
   xbt_assert(top_index_ <= this->capacity_, "top_index is not consistent");
 
   // First, we check if a page with the same content is already in the page store:
-  //  1. compute the hash of the page;
-  //  2. find pages with the same hash using `hash_index_`;
-  //  3. find a page with the same content.
+  //  1. compute the hash of the page
+  //  2. find pages with the same hash using `hash_index_`
+  //  3. find a page with the same content
   hash_type hash = mc_hash_page(page);
 
   // Try to find a duplicate in set of pages with the same hash:
   hash_type hash = mc_hash_page(page);
 
   // Try to find a duplicate in set of pages with the same hash:
index 104e8ff..c120607 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2007-2015. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -81,8 +81,8 @@ RegionSnapshot dense_region(
   void *start_addr, void* permanent_addr, size_t size)
 {
   // When KSM support is enables, we allocate memory using mmap:
   void *start_addr, void* permanent_addr, size_t size)
 {
   // When KSM support is enables, we allocate memory using mmap:
-  // * we don't want to advise bits of the heap as mergable;
-  // * mmap gives data aligned on page boundaries which is merge friendly.
+  // * we don't want to advise bits of the heap as mergable
+  // * mmap gives data aligned on page boundaries which is merge friendly
   simgrid::mc::Buffer data;
   if (_sg_mc_ksm)
     data = Buffer::mmap(size);
   simgrid::mc::Buffer data;
   if (_sg_mc_ksm)
     data = Buffer::mmap(size);
index 1b405a1..5f7b401 100644 (file)
@@ -390,7 +390,6 @@ void CommunicationDeterminismChecker::restoreState()
   /* Restore the initial state */
   simgrid::mc::session->restoreInitialState();
 
   /* Restore the initial state */
   simgrid::mc::session->restoreInitialState();
 
-  // int n = xbt_dynar_length(incomplete_communications_pattern);
   unsigned n = MC_smx_get_maxpid();
   assert(n == xbt_dynar_length(incomplete_communications_pattern));
   assert(n == xbt_dynar_length(initial_communications_pattern));
   unsigned n = MC_smx_get_maxpid();
   assert(n == xbt_dynar_length(incomplete_communications_pattern));
   assert(n == xbt_dynar_length(initial_communications_pattern));
index eef1ca8..03f96ae 100644 (file)
@@ -441,7 +441,6 @@ int mmalloc_compare_heap(
         XBT_DEBUG("Block %zu not found (size_used = %zu, addr = %p)", i1, heapinfo1->busy_block.busy_size, addr_block1);
         i1 = state.heaplimit + 1;
         nb_diff1++;
         XBT_DEBUG("Block %zu not found (size_used = %zu, addr = %p)", i1, heapinfo1->busy_block.busy_size, addr_block1);
         i1 = state.heaplimit + 1;
         nb_diff1++;
-        //i1++;
       }
 
     } else {                    /* Fragmented block */
       }
 
     } else {                    /* Fragmented block */
@@ -1339,40 +1338,34 @@ static int compare_areas_with_type(simgrid::mc::StateComparator& state,
 
     pointer_level++;
 
 
     pointer_level++;
 
-      // Some cases are not handled here:
-      // * the pointers lead to different areas (one to the heap, the other to the RW segment ...);
-      // * a pointer leads to the read-only segment of the current object;
-      // * a pointer lead to a different ELF object.
-
-      if (addr_pointed1 > process->heap_address
-          && addr_pointed1 < mc_snapshot_get_heap_end(snapshot1)) {
-        if (not(addr_pointed2 > process->heap_address && addr_pointed2 < mc_snapshot_get_heap_end(snapshot2)))
-          return 1;
-        // The pointers are both in the heap:
-        return simgrid::mc::compare_heap_area(state,
-          process_index, addr_pointed1, addr_pointed2, snapshot1,
-          snapshot2, nullptr, type->subtype, pointer_level);
-      }
+    // Some cases are not handled here:
+    // * the pointers lead to different areas (one to the heap, the other to the RW segment ...)
+    // * a pointer leads to the read-only segment of the current object
+    // * a pointer lead to a different ELF object
+
+    if (addr_pointed1 > process->heap_address && addr_pointed1 < mc_snapshot_get_heap_end(snapshot1)) {
+      if (not(addr_pointed2 > process->heap_address && addr_pointed2 < mc_snapshot_get_heap_end(snapshot2)))
+        return 1;
+      // The pointers are both in the heap:
+      return simgrid::mc::compare_heap_area(state, process_index, addr_pointed1, addr_pointed2, snapshot1, snapshot2,
+                                            nullptr, type->subtype, pointer_level);
 
 
+    } else if (region1->contain(simgrid::mc::remote(addr_pointed1))) {
       // The pointers are both in the current object R/W segment:
       // The pointers are both in the current object R/W segment:
-      else if (region1->contain(simgrid::mc::remote(addr_pointed1))) {
-        if (not region2->contain(simgrid::mc::remote(addr_pointed2)))
-          return 1;
-        if (not type->type_id)
-          return (addr_pointed1 != addr_pointed2);
-        else
-          return compare_areas_with_type(state, process_index,
-                                         addr_pointed1, snapshot1, region1,
-                                         addr_pointed2, snapshot2, region2,
-                                         type->subtype, pointer_level);
-      }
+      if (not region2->contain(simgrid::mc::remote(addr_pointed2)))
+        return 1;
+      if (not type->type_id)
+        return (addr_pointed1 != addr_pointed2);
+      else
+        return compare_areas_with_type(state, process_index, addr_pointed1, snapshot1, region1, addr_pointed2,
+                                       snapshot2, region2, type->subtype, pointer_level);
+    } else {
 
       // TODO, We do not handle very well the case where
       // it belongs to a different (non-heap) region from the current one.
 
 
       // TODO, We do not handle very well the case where
       // it belongs to a different (non-heap) region from the current one.
 
-      else
-        return (addr_pointed1 != addr_pointed2);
-
+      return (addr_pointed1 != addr_pointed2);
+    }
     break;
   }
   case DW_TAG_structure_type:
     break;
   }
   case DW_TAG_structure_type:
index 8be8053..c7a785b 100644 (file)
@@ -623,7 +623,7 @@ static void MC_dwarf_add_members(simgrid::mc::ObjectInformation* info, Dwarf_Die
 /** \brief Create a MC type object from a DIE
  *
  *  \param info current object info object
 /** \brief Create a MC type object from a DIE
  *
  *  \param info current object info object
- *  \param DIE (for a given type);
+ *  \param DIE (for a given type)
  *  \param unit compilation unit of the current DIE
  *  \return MC representation of the type
  */
  *  \param unit compilation unit of the current DIE
  *  \return MC representation of the type
  */
@@ -671,7 +671,7 @@ static simgrid::mc::Type MC_dwarf_die_to_type(
   if (type.type == DW_TAG_pointer_type)
     type.byte_size = sizeof(void*);
 
   if (type.type == DW_TAG_pointer_type)
     type.byte_size = sizeof(void*);
 
-  // Computation of the byte_size;
+  // Computation of the byte_size
   if (dwarf_hasattr_integrate(die, DW_AT_byte_size))
     type.byte_size = MC_dwarf_attr_integrate_uint(die, DW_AT_byte_size, 0);
   else if (type.type == DW_TAG_array_type
   if (dwarf_hasattr_integrate(die, DW_AT_byte_size))
     type.byte_size = MC_dwarf_attr_integrate_uint(die, DW_AT_byte_size, 0);
   else if (type.type == DW_TAG_array_type
@@ -1189,8 +1189,8 @@ void MC_load_dwarf(simgrid::mc::ObjectInformation* info)
 
   // If there was no DWARF in the file, try to find it in a separate file.
   // Different methods might be used to store the DWARF informations:
 
   // If there was no DWARF in the file, try to find it in a separate file.
   // Different methods might be used to store the DWARF informations:
-  //  * GNU NT_GNU_BUILD_ID;
-  //  * .gnu_debuglink.
+  //  * GNU NT_GNU_BUILD_ID
+  //  * .gnu_debuglink
   // See https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html
   // for reference of what we are doing.
 
   // See https://sourceware.org/gdb/onlinedocs/gdb/Separate-Debug-Files.html
   // for reference of what we are doing.
 
index 8879e90..59ccaa9 100644 (file)
@@ -235,8 +235,6 @@ std::string simgrid::mc::request_to_string(smx_simcall_t req, int value, simgrid
 
   case SIMCALL_COMM_IRECV: {
     size_t* remote_size = simcall_comm_irecv__get__dst_buff_size(req);
 
   case SIMCALL_COMM_IRECV: {
     size_t* remote_size = simcall_comm_irecv__get__dst_buff_size(req);
-
-    // size_t size = size_pointer ? *size_pointer : 0;
     size_t size = 0;
     if (remote_size)
       mc_model_checker->process().read_bytes(&size, sizeof(size),
     size_t size = 0;
     if (remote_size)
       mc_model_checker->process().read_bytes(&size, sizeof(size),
index cd22b6b..c37252a 100644 (file)
@@ -97,7 +97,6 @@ void RemoteClient::refresh_simix()
   static_assert(sizeof(simix_global) == sizeof(simgrid::simix::Global*),
     "Bad size for simix_global");
 
   static_assert(sizeof(simix_global) == sizeof(simgrid::simix::Global*),
     "Bad size for simix_global");
 
-  // simix_global_p = REMOTE(simix_global.get());
   RemotePtr<simgrid::simix::Global> simix_global_p =
     this->read_variable<simgrid::simix::Global*>("simix_global");
 
   RemotePtr<simgrid::simix::Global> simix_global_p =
     this->read_variable<simgrid::simix::Global*>("simix_global");
 
index 7566b5a..85b6129 100644 (file)
@@ -251,9 +251,6 @@ void UnwindContext::initialize(simgrid::mc::RemoteClient* process, unw_context_t
   // We don't really need support for FR registers as they are caller saved
   // and probably never use those fields as libunwind-x86_64 does not read
   // FP registers from the unw_context_t
   // We don't really need support for FR registers as they are caller saved
   // and probably never use those fields as libunwind-x86_64 does not read
   // FP registers from the unw_context_t
-  // but we fix the pointer in order to avoid dangling pointers:
-  // context->context_.uc_mcontext.fpregs = &(context->context.__fpregs_mem);
-
   // Let's ignore this and see what happens:
   this->unwindContext_.uc_mcontext.fpregs = nullptr;
 # endif
   // Let's ignore this and see what happens:
   this->unwindContext_.uc_mcontext.fpregs = nullptr;
 # endif
index 48d822c..97b5646 100644 (file)
@@ -28,7 +28,7 @@
  */
 struct _UPT_info {
   pid_t pid;
  */
 struct _UPT_info {
   pid_t pid;
-  // Other things;
+  // Other things...
 };
 
 /** Get the PID of a `libunwind-ptrace` context
 };
 
 /** Get the PID of a `libunwind-ptrace` context
index 7156228..1566e85 100644 (file)
@@ -158,7 +158,6 @@ sg_size_t MSG_file_write(msg_file_t fd, sg_size_t size)
     }
   }
   /* Write file on local or remote host */
     }
   }
   /* Write file on local or remote host */
-  // sg_size_t offset     = fd->tell();
   sg_size_t write_size = fd->write(size); // TODO readd attached_host
 
   return write_size;
   sg_size_t write_size = fd->write(size); // TODO readd attached_host
 
   return write_size;
index c385ac7..1829b63 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2012-2015. The SimGrid Team.
+/* Copyright (c) 2012-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -318,7 +318,6 @@ static int migration_rx_fun(int argc, char *argv[])
   std::string task_name = get_mig_task_name(ms->vm, ms->src_pm, ms->dst_pm, 4);
   msg_task_t task       = MSG_task_create(task_name.c_str(), 0, 0, nullptr);
   msg_error_t ret = MSG_task_send(task, ms->mbox_ctl);
   std::string task_name = get_mig_task_name(ms->vm, ms->src_pm, ms->dst_pm, 4);
   msg_task_t task       = MSG_task_create(task_name.c_str(), 0, 0, nullptr);
   msg_error_t ret = MSG_task_send(task, ms->mbox_ctl);
-  // xbt_assert(ret == MSG_OK);
   if(ret == MSG_HOST_FAILURE){
     // The DST has crashed, this is a problem has the VM since we are not sure whether SRC is considering that the VM
     // has been correctly migrated on the DST node
   if(ret == MSG_HOST_FAILURE){
     // The DST has crashed, this is a problem has the VM since we are not sure whether SRC is considering that the VM
     // has been correctly migrated on the DST node
@@ -375,7 +374,6 @@ static double lookup_computed_flop_counts(msg_vm_t vm, int stage_for_fancy_debug
 
     double clock = MSG_get_clock();
 
 
     double clock = MSG_get_clock();
 
-    // total += calc_updated_pages(key, vm, dp, remaining, clock);
     total += get_computed(key, vm, dp, remaining, clock);
 
     dp->prev_remaining = remaining;
     total += get_computed(key, vm, dp, remaining, clock);
 
     dp->prev_remaining = remaining;
@@ -433,7 +431,6 @@ void MSG_host_del_task(msg_host_t host, msg_task_t task)
   if (vm->pimpl_vm_->dp_enabled) {
     double remaining = MSG_task_get_flops_amount(task);
     double clock = MSG_get_clock();
   if (vm->pimpl_vm_->dp_enabled) {
     double remaining = MSG_task_get_flops_amount(task);
     double clock = MSG_get_clock();
-    // double updated = calc_updated_pages(key, host, dp, remaining, clock);
     double updated = get_computed(key, vm, dp, remaining, clock); // was host instead of vm
 
     vm->pimpl_vm_->dp_updated_by_deleted_tasks += updated;
     double updated = get_computed(key, vm, dp, remaining, clock); // was host instead of vm
 
     vm->pimpl_vm_->dp_updated_by_deleted_tasks += updated;
@@ -499,8 +496,6 @@ static sg_size_t get_updated_size(double computed, double dp_rate, double dp_cap
   double updated_size = computed * dp_rate;
   XBT_DEBUG("updated_size %f dp_rate %f", updated_size, dp_rate);
   if (updated_size > dp_cap) {
   double updated_size = computed * dp_rate;
   XBT_DEBUG("updated_size %f dp_rate %f", updated_size, dp_rate);
   if (updated_size > dp_cap) {
-    // XBT_INFO("mig-stage2.%d: %f bytes updated, but cap it with the working set size %f", stage2_round, updated_size,
-    //          dp_cap);
     updated_size = dp_cap;
   }
 
     updated_size = dp_cap;
   }
 
index b60dfc3..f672a50 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2013-2015. The SimGrid Team.
+/* Copyright (c) 2013-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -41,8 +41,7 @@ std::deque<s4u::VirtualMachine*> VirtualMachineImpl::allVms_;
  * The total CPU share these processes get is smaller than that of the VM process gets on a host operating system.
  * FIXME: add a configuration flag for this
  */
  * The total CPU share these processes get is smaller than that of the VM process gets on a host operating system.
  * FIXME: add a configuration flag for this
  */
-// const double virt_overhead = 0.95;
-const double virt_overhead = 1;
+const double virt_overhead = 1; // 0.95
 
 static void hostStateChange(s4u::Host& host)
 {
 
 static void hostStateChange(s4u::Host& host)
 {
index 9fe8020..88656c0 100644 (file)
@@ -173,7 +173,7 @@ void SD_init_nocheck(int *argc, char **argv)
  * Do --help on any simgrid binary to see the list of currently existing configuration variables, and
  * see Section @ref options.
  *
  * Do --help on any simgrid binary to see the list of currently existing configuration variables, and
  * see Section @ref options.
  *
- * Example: SD_config("host/model","default");
+ * Example: SD_config("host/model","default")
  */
 void SD_config(const char *key, const char *value){
   xbt_assert(sd_global,"ERROR: Please call SD_init() before using SD_config()");
  */
 void SD_config(const char *key, const char *value){
   xbt_assert(sd_global,"ERROR: Please call SD_init() before using SD_config()");
index 91a79b1..6afbc1c 100644 (file)
@@ -25,9 +25,11 @@ void SIMIX_simcall_answer(smx_simcall_t simcall)
         simcall->issuer->name.c_str(), simcall->issuer);
     simcall->issuer->simcall.call = SIMCALL_NONE;
     /* This check should be useless and slows everyone. Reactivate if you see something weird in process scheduling. */
         simcall->issuer->name.c_str(), simcall->issuer);
     simcall->issuer->simcall.call = SIMCALL_NONE;
     /* This check should be useless and slows everyone. Reactivate if you see something weird in process scheduling. */
-    // if (std::find(begin(simix_global->process_to_run), end(simix_global->process_to_run), simcall->issuer) !=
-    //         end(simix_global->process_to_run))
-    //   DIE_IMPOSSIBLE;
+    if (0) {
+      if (std::find(begin(simix_global->process_to_run), end(simix_global->process_to_run), simcall->issuer) !=
+          end(simix_global->process_to_run))
+        DIE_IMPOSSIBLE;
+    }
     simix_global->process_to_run.push_back(simcall->issuer);
   }
 }
     simix_global->process_to_run.push_back(simcall->issuer);
   }
 }
index 7975425..591cf58 100644 (file)
@@ -315,7 +315,8 @@ void simcall_HANDLER_comm_wait(smx_simcall_t simcall, smx_activity_t synchro, do
   /* otherwise set up a waiting timeout on the right side          */
   if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) {
     SIMIX_comm_finish(synchro);
   /* otherwise set up a waiting timeout on the right side          */
   if (synchro->state != SIMIX_WAITING && synchro->state != SIMIX_RUNNING) {
     SIMIX_comm_finish(synchro);
-  } else { /* if (timeout >= 0) { we need a surf sleep action even when there is no timeout, otherwise surf won't tell us when the host fails */
+  } else { /* we need a surf sleep action even when there is no timeout, otherwise surf won't tell us when the host
+              fails */
     surf_action_t sleep = simcall->issuer->host->pimpl_cpu->sleep(timeout);
     sleep->setData(&*synchro);
 
     surf_action_t sleep = simcall->issuer->host->pimpl_cpu->sleep(timeout);
     sleep->setData(&*synchro);
 
@@ -546,7 +547,6 @@ void SIMIX_comm_finish(smx_activity_t synchro)
         case SIMIX_SRC_HOST_FAILURE:
           if (simcall->issuer == comm->src_proc)
             simcall->issuer->context->iwannadie = 1;
         case SIMIX_SRC_HOST_FAILURE:
           if (simcall->issuer == comm->src_proc)
             simcall->issuer->context->iwannadie = 1;
-          //          SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
           else
             SMX_EXCEPTION(simcall->issuer, network_error, 0, "Remote peer failed");
           break;
           else
             SMX_EXCEPTION(simcall->issuer, network_error, 0, "Remote peer failed");
           break;
@@ -554,7 +554,6 @@ void SIMIX_comm_finish(smx_activity_t synchro)
         case SIMIX_DST_HOST_FAILURE:
           if (simcall->issuer == comm->dst_proc)
             simcall->issuer->context->iwannadie = 1;
         case SIMIX_DST_HOST_FAILURE:
           if (simcall->issuer == comm->dst_proc)
             simcall->issuer->context->iwannadie = 1;
-          //          SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
           else
             SMX_EXCEPTION(simcall->issuer, network_error, 0, "Remote peer failed");
           break;
           else
             SMX_EXCEPTION(simcall->issuer, network_error, 0, "Remote peer failed");
           break;
index 66f332c..c47d04c 100644 (file)
@@ -79,7 +79,6 @@ void SIMIX_synchro_finish(smx_activity_t synchro)
 
     case SIMIX_FAILED:
         simcall->issuer->context->iwannadie = 1;
 
     case SIMIX_FAILED:
         simcall->issuer->context->iwannadie = 1;
-//      SMX_EXCEPTION(simcall->issuer, host_error, 0, "Host failed");
       break;
 
     default:
       break;
 
     default:
index 5b05ac5..24ba704 100644 (file)
@@ -128,8 +128,6 @@ void smpi_bench_end()
     } else {
       for (unsigned int i = 0; i < counter_data.size(); i++) {
         counter_data[i].second += event_values[i];
     } else {
       for (unsigned int i = 0; i < counter_data.size(); i++) {
         counter_data[i].second += event_values[i];
-        // XBT_DEBUG("[%i] PAPI: Counter %s: Value is now %lli (got increment by %lli\n", smpi_process()->index(),
-        // counter_data[i].first.c_str(), counter_data[i].second, event_values[i]);
       }
     }
   }
       }
     }
   }
index 7e70a86..0f671f5 100644 (file)
@@ -242,8 +242,6 @@ void lagrange_solve(lmm_system_t sys)
       if (var->bound >= 0) {
         XBT_DEBUG("Working on var (%p)", var);
         var->new_mu = new_mu(var);
       if (var->bound >= 0) {
         XBT_DEBUG("Working on var (%p)", var);
         var->new_mu = new_mu(var);
-/*   dual_updated += (fabs(var->new_mu-var->mu)>dichotomy_min_error); */
-/*   XBT_DEBUG("dual_updated (%d) : %1.20f",dual_updated,fabs(var->new_mu-var->mu)); */
         XBT_DEBUG("Updating mu : var->mu (%p) : %1.20f -> %1.20f", var, var->mu, var->new_mu);
         var->mu = var->new_mu;
 
         XBT_DEBUG("Updating mu : var->mu (%p) : %1.20f -> %1.20f", var, var->mu, var->new_mu);
         var->mu = var->new_mu;
 
@@ -259,8 +257,6 @@ void lagrange_solve(lmm_system_t sys)
       cnst = static_cast<lmm_constraint_t>(_cnst);
       XBT_DEBUG("Working on cnst (%p)", cnst);
       cnst->new_lambda = dichotomy(cnst->lambda, partial_diff_lambda, cnst, dichotomy_min_error);
       cnst = static_cast<lmm_constraint_t>(_cnst);
       XBT_DEBUG("Working on cnst (%p)", cnst);
       cnst->new_lambda = dichotomy(cnst->lambda, partial_diff_lambda, cnst, dichotomy_min_error);
-/*       dual_updated += (fabs(cnst->new_lambda-cnst->lambda)>dichotomy_min_error); */
-/*       XBT_DEBUG("dual_updated (%d) : %1.20f",dual_updated,fabs(cnst->new_lambda-cnst->lambda)); */
       XBT_DEBUG("Updating lambda : cnst->lambda (%p) : %1.20f -> %1.20f", cnst, cnst->lambda, cnst->new_lambda);
       cnst->lambda = cnst->new_lambda;
 
       XBT_DEBUG("Updating lambda : cnst->lambda (%p) : %1.20f -> %1.20f", cnst, cnst->lambda, cnst->new_lambda);
       cnst->lambda = cnst->new_lambda;
 
@@ -291,10 +287,6 @@ void lagrange_solve(lmm_system_t sys)
     if (not __check_feasible(cnst_list, var_list, 0))
       overall_modification = 1.0;
     XBT_DEBUG("Iteration %d: overall_modification : %f", iteration, overall_modification);
     if (not __check_feasible(cnst_list, var_list, 0))
       overall_modification = 1.0;
     XBT_DEBUG("Iteration %d: overall_modification : %f", iteration, overall_modification);
-    /*     if(not dual_updated) { */
-    /*       XBT_WARN("Could not improve the convergence at iteration %d. Drop it!",iteration); */
-    /*       break; */
-    /*     } */
   }
 
   __check_feasible(cnst_list, var_list, 1);
   }
 
   __check_feasible(cnst_list, var_list, 1);
@@ -391,25 +383,20 @@ static double dichotomy(double init, double diff(double, void *), void *var_cnst
         min = middle;
         overall_error = max_diff - middle_diff;
         min_diff = middle_diff;
         min = middle;
         overall_error = max_diff - middle_diff;
         min_diff = middle_diff;
-/*   SHOW_EXPR(overall_error); */
       } else if (middle_diff > 0) {
         XBT_CDEBUG(surf_lagrange_dichotomy, "Decreasing max");
         max = middle;
         overall_error = max_diff - middle_diff;
         max_diff = middle_diff;
       } else if (middle_diff > 0) {
         XBT_CDEBUG(surf_lagrange_dichotomy, "Decreasing max");
         max = middle;
         overall_error = max_diff - middle_diff;
         max_diff = middle_diff;
-/*   SHOW_EXPR(overall_error); */
       } else {
         overall_error = 0;
       } else {
         overall_error = 0;
-/*   SHOW_EXPR(overall_error); */
       }
     } else if (fabs(min_diff) < 1e-20) {
       max = min;
       overall_error = 0;
       }
     } else if (fabs(min_diff) < 1e-20) {
       max = min;
       overall_error = 0;
-/*       SHOW_EXPR(overall_error); */
     } else if (fabs(max_diff) < 1e-20) {
       min = max;
       overall_error = 0;
     } else if (fabs(max_diff) < 1e-20) {
       min = max;
       overall_error = 0;
-/*       SHOW_EXPR(overall_error); */
     } else if (min_diff > 0 && max_diff < 0) {
       XBT_CWARN(surf_lagrange_dichotomy, "The impossible happened, partial_diff(min) > 0 && partial_diff(max) < 0");
       xbt_abort();
     } else if (min_diff > 0 && max_diff < 0) {
       XBT_CWARN(surf_lagrange_dichotomy, "The impossible happened, partial_diff(min) > 0 && partial_diff(max) < 0");
       xbt_abort();
@@ -541,7 +528,6 @@ double func_reno_fpi(lmm_variable_t var, double x)
             2.0 / (3.0 * var->sharing_weight * var->sharing_weight);
   if (res_fpi <= 0.0)
     return 0.0;
             2.0 / (3.0 * var->sharing_weight * var->sharing_weight);
   if (res_fpi <= 0.0)
     return 0.0;
-/*   xbt_assert(res_fpi>0.0,"Don't call me with stupid values!"); */
   return sqrt(res_fpi);
 }
 
   return sqrt(res_fpi);
 }
 
index 02c65df..baac105 100644 (file)
@@ -767,7 +767,6 @@ void lmm_solve(lmm_system_t sys)
   xbt_swag_foreach(_cnst, cnst_list) {
     lmm_constraint_t cnst = (lmm_constraint_t)_cnst;
     xbt_swag_t elem_list  = &(cnst->enabled_element_set);
   xbt_swag_foreach(_cnst, cnst_list) {
     lmm_constraint_t cnst = (lmm_constraint_t)_cnst;
     xbt_swag_t elem_list  = &(cnst->enabled_element_set);
-    //XBT_DEBUG("Variable set : %d", xbt_swag_size(elem_list));
     xbt_swag_foreach(_elem, elem_list) {
       lmm_variable_t var = ((lmm_element_t)_elem)->variable;
       xbt_assert(var->sharing_weight > 0.0);
     xbt_swag_foreach(_elem, elem_list) {
       lmm_variable_t var = ((lmm_element_t)_elem)->variable;
       xbt_assert(var->sharing_weight > 0.0);
@@ -852,7 +851,6 @@ void lmm_solve(lmm_system_t sys)
         //If no variable could reach its bound, deal iteratively the constraints usage ( at worst one constraint is
         // saturated at each cycle)
         var->value = min_usage / var->sharing_weight;
         //If no variable could reach its bound, deal iteratively the constraints usage ( at worst one constraint is
         // saturated at each cycle)
         var->value = min_usage / var->sharing_weight;
-        // XBT_DEBUG("Setting %p (%d) value to %f\n", var, var->id_int, var->value);
         XBT_DEBUG("Setting var (%d) value to %f\n", var->id_int, var->value);
       } else {
          //If there exist a variable that can reach its bound, only update it (and other with the same bound) for now.
         XBT_DEBUG("Setting var (%d) value to %f\n", var->id_int, var->value);
       } else {
          //If there exist a variable that can reach its bound, only update it (and other with the same bound) for now.
@@ -884,9 +882,6 @@ void lmm_solve(lmm_system_t sys)
               int index = (cnst->cnst_light-cnst_light_tab);
               XBT_DEBUG("index: %d \t cnst_light_num: %d \t || usage: %f remaining: %f bound: %f  ",
                          index,cnst_light_num, cnst->usage, cnst->remaining, cnst->bound);
               int index = (cnst->cnst_light-cnst_light_tab);
               XBT_DEBUG("index: %d \t cnst_light_num: %d \t || usage: %f remaining: %f bound: %f  ",
                          index,cnst_light_num, cnst->usage, cnst->remaining, cnst->bound);
-              //XBT_DEBUG("index: %d \t cnst_light_num: %d \t || \t cnst: %p \t cnst->cnst_light: %p "
-              //          "\t cnst_light_tab: %p usage: %f remaining: %f bound: %f  ", index,cnst_light_num,
-              //          cnst, cnst->cnst_light, cnst_light_tab, cnst->usage, cnst->remaining, cnst->bound);
               cnst_light_tab[index]=cnst_light_tab[cnst_light_num-1];
               cnst_light_tab[index].cnst->cnst_light = &cnst_light_tab[index];
               cnst_light_num--;
               cnst_light_tab[index]=cnst_light_tab[cnst_light_num-1];
               cnst_light_tab[index].cnst->cnst_light = &cnst_light_tab[index];
               cnst_light_num--;
@@ -1045,7 +1040,6 @@ void lmm_enable_var(lmm_system_t sys, lmm_variable_t var){
   //When used within lmm_on_disabled_var, we would get an assertion fail, because transiently there can be variables
   // that are staged and could be activated.
   //Anyway, caller functions all call lmm_check_concurrency() in the end.
   //When used within lmm_on_disabled_var, we would get an assertion fail, because transiently there can be variables
   // that are staged and could be activated.
   //Anyway, caller functions all call lmm_check_concurrency() in the end.
-  //  lmm_check_concurrency(sys);
 }
 
 void lmm_disable_var(lmm_system_t sys, lmm_variable_t var){
 }
 
 void lmm_disable_var(lmm_system_t sys, lmm_variable_t var){
@@ -1114,7 +1108,6 @@ void lmm_on_disabled_var(lmm_system_t sys, lmm_constraint_t cnstr){
   //We could get an assertion fail, because transiently there can be variables that are staged and could be activated.
   //And we need to go through all constraints of the disabled var before getting back a coherent state.
   //Anyway, caller functions all call lmm_check_concurrency() in the end.
   //We could get an assertion fail, because transiently there can be variables that are staged and could be activated.
   //And we need to go through all constraints of the disabled var before getting back a coherent state.
   //Anyway, caller functions all call lmm_check_concurrency() in the end.
-  //  lmm_check_concurrency(sys);
 }
 
 /* \brief update the weight of a variable, and enable/disable it.
 }
 
 /* \brief update the weight of a variable, and enable/disable it.
index d2f380b..3947248 100644 (file)
@@ -519,7 +519,6 @@ void xbt_cfg_set_parse(const char *options)
       /* Pass the following blank chars */
       *(option++) = '\0';
       while (option - name < (len - 1) && (*option == ' ' || *option == '\n' || *option == '\t')) {
       /* Pass the following blank chars */
       *(option++) = '\0';
       while (option - name < (len - 1) && (*option == ' ' || *option == '\n' || *option == '\t')) {
-        /*      fprintf(stderr,"Ignore a blank char.\n"); */
         option++;
       }
       if (option - name == len - 1)
         option++;
       }
       if (option - name == len - 1)
index 9da7c7e..87c869c 100644 (file)
@@ -469,8 +469,6 @@ static void apply_selection(char *selection)
   if (not selection || selection[0] == '\0')
     return;
 
   if (not selection || selection[0] == '\0')
     return;
 
-  /*printf("Test selection: %s\n", selection); */
-
   /* First apply the selection */
   while (not done) {
     int enabling = 1;
   /* First apply the selection */
   while (not done) {
     int enabling = 1;
index 485641c..2d2520d 100644 (file)
@@ -622,7 +622,6 @@ static void debugged_remove(xbt_dict_t head, const char* key)
 {
   xbt_test_add("Remove '%s'", key);
   xbt_dict_remove(head, key);
 {
   xbt_test_add("Remove '%s'", key);
   xbt_dict_remove(head, key);
-  /*  xbt_dict_dump(head,(void (*)(void*))&printf); */
 }
 
 static void traverse(xbt_dict_t head)
 }
 
 static void traverse(xbt_dict_t head)
@@ -766,8 +765,6 @@ XBT_TEST_UNIT("basic", test_dict_basic, "Basic usage: change, retrieve and trave
   xbt_test_add("Traverse the resulting dictionary");
   traverse(head);
 
   xbt_test_add("Traverse the resulting dictionary");
   traverse(head);
 
-  /*  xbt_dict_dump(head,(void (*)(void*))&printf); */
-
   xbt_test_add("Free the dictionary twice");
   xbt_dict_free(&head);
   xbt_dict_free(&head);
   xbt_test_add("Free the dictionary twice");
   xbt_dict_free(&head);
   xbt_dict_free(&head);
@@ -895,7 +892,6 @@ XBT_TEST_UNIT("crash", test_dict_crash, "Crash test")
     xbt_test_log("Fill the struct, count its elems and frees the structure");
     xbt_test_log("using 1000 elements with %d chars long randomized keys.", SIZEOFKEY);
     xbt_dict_t head = xbt_dict_new_homogeneous(free);
     xbt_test_log("Fill the struct, count its elems and frees the structure");
     xbt_test_log("using 1000 elements with %d chars long randomized keys.", SIZEOFKEY);
     xbt_dict_t head = xbt_dict_new_homogeneous(free);
-    /* if (i%10) printf("."); else printf("%d",i/10); fflush(stdout); */
     for (int j = 0; j < 1000; j++) {
       char* data = nullptr;
       char* key  = (char*)xbt_malloc(SIZEOFKEY);
     for (int j = 0; j < 1000; j++) {
       char* data = nullptr;
       char* key  = (char*)xbt_malloc(SIZEOFKEY);
@@ -904,7 +900,6 @@ XBT_TEST_UNIT("crash", test_dict_crash, "Crash test")
         for (int k         = 0; k < SIZEOFKEY - 1; k++)
           key[k] = rand() % ('z' - 'a') + 'a';
         key[SIZEOFKEY - 1] = '\0';
         for (int k         = 0; k < SIZEOFKEY - 1; k++)
           key[k] = rand() % ('z' - 'a') + 'a';
         key[SIZEOFKEY - 1] = '\0';
-        /*      printf("[%d %s]\n",j,key); */
         data = (char*) xbt_dict_get_or_null(head, key);
       } while (data != nullptr);
 
         data = (char*) xbt_dict_get_or_null(head, key);
       } while (data != nullptr);
 
@@ -914,7 +909,6 @@ XBT_TEST_UNIT("crash", test_dict_crash, "Crash test")
 
       count(head, j + 1);
     }
 
       count(head, j + 1);
     }
-    /*    xbt_dict_dump(head,(void (*)(void*))&printf); */
     traverse(head);
     xbt_dict_free(&head);
     xbt_dict_free(&head);
     traverse(head);
     xbt_dict_free(&head);
     xbt_dict_free(&head);
@@ -928,7 +922,6 @@ XBT_TEST_UNIT("crash", test_dict_crash, "Crash test")
     snprintf(key,10, "%d", j);
     xbt_dict_set(head, key, key, nullptr);
   }
     snprintf(key,10, "%d", j);
     xbt_dict_set(head, key, key, nullptr);
   }
-  /*xbt_dict_dump(head,(void (*)(void*))&printf); */
 
   xbt_test_add("Count the elements (retrieving the key and data for each)");
   xbt_test_log("There is %d elements", countelems(head));
 
   xbt_test_add("Count the elements (retrieving the key and data for each)");
   xbt_test_log("There is %d elements", countelems(head));
@@ -936,7 +929,6 @@ XBT_TEST_UNIT("crash", test_dict_crash, "Crash test")
   xbt_test_add("Search my %d elements 20 times", NB_ELM);
   char* key = (char*)xbt_malloc(10);
   for (int i = 0; i < 20; i++) {
   xbt_test_add("Search my %d elements 20 times", NB_ELM);
   char* key = (char*)xbt_malloc(10);
   for (int i = 0; i < 20; i++) {
-    /* if (i%10) printf("."); else printf("%d",i/10); fflush(stdout); */
     for (int j = 0; j < NB_ELM; j++) {
       snprintf(key,10, "%d", j);
       void* data = xbt_dict_get(head, key);
     for (int j = 0; j < NB_ELM; j++) {
       snprintf(key,10, "%d", j);
       void* data = xbt_dict_get(head, key);
index 4c44eb3..63bbc44 100644 (file)
@@ -729,7 +729,6 @@ XBT_TEST_UNIT("int", test_dynar_int, "Dynars of integers")
 
   for (int cpt = 0; cpt < NB_ELEM; cpt++)
     *(int *) xbt_dynar_get_ptr(d, cpt) = cpt;
 
   for (int cpt = 0; cpt < NB_ELEM; cpt++)
     *(int *) xbt_dynar_get_ptr(d, cpt) = cpt;
-  /*     xbt_dynar_set(d,cpt,&cpt); */
 
   for (int cpt = 0; cpt < NB_ELEM; cpt++)
     *(int *) xbt_dynar_get_ptr(d, cpt) = cpt;
 
   for (int cpt = 0; cpt < NB_ELEM; cpt++)
     *(int *) xbt_dynar_get_ptr(d, cpt) = cpt;
index 04772a3..a3a3918 100644 (file)
@@ -281,8 +281,9 @@ void xbt_log_init(int *argc, char **argv)
   int j                   = 1;
 
   /* uncomment to set the LOG category to debug directly */
   int j                   = 1;
 
   /* uncomment to set the LOG category to debug directly */
-  //    _XBT_LOGV(log).threshold = xbt_log_priority_debug;
-
+  if (0) {
+    _XBT_LOGV(log).threshold = xbt_log_priority_debug;
+  }
   xbt_log_connect_categories();
 
   /* Set logs and init log submodule */
   xbt_log_connect_categories();
 
   /* Set logs and init log submodule */
index fa9f582..e3a0319 100644 (file)
@@ -1,6 +1,6 @@
 /* mallocator - recycle objects to avoid malloc() / free()                  */
 
 /* mallocator - recycle objects to avoid malloc() / free()                  */
 
-/* Copyright (c) 2006-2014. The SimGrid Team.
+/* Copyright (c) 2006-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -154,8 +154,6 @@ void *xbt_mallocator_get(xbt_mallocator_t m)
     if (m->current_size <= 0) {
       /* No object is ready yet. Create a bunch of them to try to group the
        * mallocs on the same memory pages (to help the cache lines) */
     if (m->current_size <= 0) {
       /* No object is ready yet. Create a bunch of them to try to group the
        * mallocs on the same memory pages (to help the cache lines) */
-
-      /* XBT_DEBUG("Create a new object for mallocator %p (size:%d/%d)", m, m->current_size, m->max_size); */
       int i;
       int amount = MIN(m->max_size / 2, 1000);
       for (i = 0; i < amount; i++)
       int i;
       int amount = MIN(m->max_size / 2, 1000);
       for (i = 0; i < amount; i++)
@@ -164,7 +162,6 @@ void *xbt_mallocator_get(xbt_mallocator_t m)
     }
 
     /* there is at least an available object, now */
     }
 
     /* there is at least an available object, now */
-    /* XBT_DEBUG("Reuse an old object for mallocator %p (size:%d/%d)", m, m->current_size, m->max_size); */
     object = m->objects[--m->current_size];
     lock_release(m);
   } else {
     object = m->objects[--m->current_size];
     lock_release(m);
   } else {
@@ -202,14 +199,11 @@ void xbt_mallocator_release(xbt_mallocator_t m, void *object)
     lock_acquire(m);
     if (m->current_size < m->max_size) {
       /* there is enough place to push the object */
     lock_acquire(m);
     if (m->current_size < m->max_size) {
       /* there is enough place to push the object */
-      /* XBT_DEBUG("Store deleted object in mallocator %p for further use (size:%d/%d)",
-         m, m->current_size, m->max_size); */
       m->objects[m->current_size++] = object;
       lock_release(m);
     } else {
       lock_release(m);
       /* otherwise we don't have a choice, we must free the object */
       m->objects[m->current_size++] = object;
       lock_release(m);
     } else {
       lock_release(m);
       /* otherwise we don't have a choice, we must free the object */
-      /* XBT_DEBUG("Free deleted object: mallocator %p is full (size:%d/%d)", m, m->current_size, m->max_size); */
       m->free_f(object);
     }
   } else {
       m->free_f(object);
     }
   } else {
index 73e2d8d..ed7ee9d 100644 (file)
@@ -187,8 +187,6 @@ XBT_PRIVATE std::vector<VmMap> get_memory_map(pid_t pid)
      * 00602000-00603000 rw-p 00002000 00:28 1837264                            <complete-path-to-file>
      */
 
      * 00602000-00603000 rw-p 00002000 00:28 1837264                            <complete-path-to-file>
      */
 
-    //fprintf(stderr,"%s", line);
-
     /* Wipeout the new line character */
     line[read - 1] = '\0';
 
     /* Wipeout the new line character */
     line[read - 1] = '\0';
 
index e10514e..9d3af40 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (c) 2004-2014. The SimGrid Team.
+/* Copyright (c) 2004-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -212,7 +212,6 @@ XBT_TEST_UNIT("basic", test_swag_basic, "Basic usage")
 
   xbt_test_assert(xbt_swag_remove(NULL, setB) == NULL);
   xbt_test_assert(xbt_swag_remove(obj1, setB) == obj1);
 
   xbt_test_assert(xbt_swag_remove(NULL, setB) == NULL);
   xbt_test_assert(xbt_swag_remove(obj1, setB) == obj1);
-  /*  xbt_test_assert(xbt_swag_remove(obj2, setB) == obj2); */
 
   xbt_test_add("Traverse set A");
   xbt_swag_foreach(obj, setA) {
 
   xbt_test_add("Traverse set A");
   xbt_swag_foreach(obj, setA) {
index 2e938d1..472a314 100644 (file)
@@ -1,6 +1,6 @@
 /* file_appender - a dumb log appender which simply prints to a file        */
 
 /* file_appender - a dumb log appender which simply prints to a file        */
 
-/* Copyright (c) 2007-2014. The SimGrid Team.
+/* Copyright (c) 2007-2017. The SimGrid Team.
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
  * All rights reserved.                                                     */
 
 /* This program is free software; you can redistribute it and/or modify it
@@ -53,7 +53,6 @@ static void open_append2_file(xbt_log_append2_file_t data){
       fseek(data->file,0,SEEK_SET);
     }
   } else{
       fseek(data->file,0,SEEK_SET);
     }
   } else{
-    //printf("Splitting\n");
     //Split
     if(data->file)
       fclose(data->file);
     //Split
     if(data->file)
       fclose(data->file);
index a002dc0..6bb1b1e 100644 (file)
@@ -167,7 +167,7 @@ int main(int argc, char **argv)
   unsigned int nb_var= TestClasses[testclass][1];
   unsigned int pw_base_limit= TestClasses[testclass][2];
   unsigned int pw_max_limit= TestClasses[testclass][3];
   unsigned int nb_var= TestClasses[testclass][1];
   unsigned int pw_base_limit= TestClasses[testclass][2];
   unsigned int pw_max_limit= TestClasses[testclass][3];
-  unsigned int max_share=2; //1<<(pw_base_limit/2+1);
+  unsigned int max_share    = 2; // 1<<(pw_base_limit/2+1)
 
   //If you want to test concurrency, you need nb_elem >> 2^pw_base_limit:
   unsigned int nb_elem= (1<<pw_base_limit)+(1<<(8*pw_max_limit/10));
 
   //If you want to test concurrency, you need nb_elem >> 2^pw_base_limit:
   unsigned int nb_elem= (1<<pw_base_limit)+(1<<(8*pw_max_limit/10));