Logo AND Algorithmique Numérique Distribuée

Public GIT Repository
Merge 'master' into mc
authorGabriel Corona <gabriel.corona@loria.fr>
Mon, 24 Feb 2014 09:04:38 +0000 (10:04 +0100)
committerGabriel Corona <gabriel.corona@loria.fr>
Mon, 24 Feb 2014 09:04:38 +0000 (10:04 +0100)
Conflicts:
src/mc/mc_checkpoint.c
src/mc/mc_global.c
src/mc/mc_private.h

21 files changed:
1  2 
CMakeLists.txt
buildtools/Cmake/CompleteInFiles.cmake
buildtools/Cmake/DefinePackages.cmake
buildtools/Cmake/MakeLib.cmake
include/smpi/mpi.h
include/xbt/mmalloc.h
src/include/mc/datatypes.h
src/include/mc/mc.h
src/mc/mc_checkpoint.c
src/mc/mc_compare.c
src/mc/mc_dpor.c
src/mc/mc_global.c
src/mc/mc_liveness.c
src/mc/mc_memory.c
src/mc/mc_private.h
src/mc/mc_request.c
src/mc/mc_state.c
src/simgrid/sg_config.c
src/simix/smx_network.c
src/xbt/backtrace_linux.c
src/xbt/mmalloc/mm_diff.c

diff --cc CMakeLists.txt
@@@ -4,9 -4,12 +4,12 @@@ if(WIN32
    SET(CMAKE_RC_COMPILER "windres")
  endif()
  project(SimGrid C)
 -if (enable_gtnets OR enable_ns3)
 +if (enable_gtnets OR enable_ns3 OR enable_model-checking)
    enable_language(CXX)
  endif()
+ enable_language(CXX)
  if (NOT DEFINED enable_smpi OR enable_smpi) # smpi is enabled by default
    # Call enable_language(Fortran) in order to load the build rules for
    # this language, needed by teshsuite/smpi/mpich-test/.  Use
@@@ -212,8 -225,10 +225,11 @@@ if(enable_model-checking AND HAVE_MMALL
    SET(HAVE_MC 1)
    SET(MMALLOC_WANT_OVERRIDE_LEGACY 1)
    include(FindLibunwind)
 +  include(FindLibdw)
  else()
+   if(enable_model-checking)
+     message(STATUS "Warning: support for model-checking has been disabled because HAVE_MMALLOC is false")
+   endif()
    SET(HAVE_MC 0)
    SET(MMALLOC_WANT_OVERRIDE_LEGACY 0)
  endif()
@@@ -976,8 -1005,8 +1008,9 @@@ set(CMAKE_SOURCE_FILE
    buildtools/Cmake/Modules/FindGFortran.cmake
    buildtools/Cmake/Modules/FindGTnets.cmake
    buildtools/Cmake/Modules/FindGraphviz.cmake
+   buildtools/Cmake/Modules/FindLibSigc++.cmake
    buildtools/Cmake/Modules/FindLibunwind.cmake
 +  buildtools/Cmake/Modules/FindLibdw.cmake
    buildtools/Cmake/Modules/FindLua51Simgrid.cmake
    buildtools/Cmake/Modules/FindNS3.cmake
    buildtools/Cmake/Modules/FindRngStream.cmake
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
@@@ -474,11 -314,110 +474,10 @@@ static dw_location_t MC_dwarf_get_locat
  
  }
  
 -static xbt_dict_t MC_dwarf_get_location_list(const char *elf_file){
 -
 -  char *command = bprintf("objdump -Wo %s", elf_file);
 -
 -  FILE *fp = popen(command, "r");
 -
 -  if(fp == NULL){
 -    perror("popen for objdump failed");
 -    xbt_abort();
 -  }
 -
 -  int debug = 0; /*Detect if the program has been compiled with -g */
 -
 -  xbt_dict_t location_list = xbt_dict_new_homogeneous(NULL);
 -  char *line = NULL, *loc_expr = NULL;
 -  ssize_t read;
 -  size_t n = 0;
 -  int cursor_remove;
 -  xbt_dynar_t split = NULL;
 -
 -  while ((read = xbt_getline(&line, &n, fp)) != -1) {
 -
 -    /* Wipeout the new line character */
 -    line[read - 1] = '\0';
 -
 -    xbt_str_trim(line, NULL);
 -    
 -    if(n == 0)
 -      continue;
 -
 -    if(strlen(line) == 0)
 -      continue;
 -
 -    if(debug == 0){
 -
 -      if(strncmp(line, elf_file, strlen(elf_file)) == 0)
 -        continue;
 -      
 -      if(strncmp(line, "Contents", 8) == 0)
 -        continue;
 -
 -      if(strncmp(line, "Offset", 6) == 0){
 -        debug = 1;
 -        continue;
 -      }
 -    }
 -
 -    if(debug == 0){
 -      XBT_INFO("Your program must be compiled with -g");
 -      xbt_abort();
 -    }
 -
 -    xbt_dynar_t loclist = xbt_dynar_new(sizeof(dw_location_entry_t), NULL);
 -
 -    xbt_str_strip_spaces(line);
 -    split = xbt_str_split(line, " ");
 -
 -    while(read != -1 && strcmp("<End", (char *)xbt_dynar_get_as(split, 1, char *)) != 0){
 -      
 -      dw_location_entry_t new_entry = xbt_new0(s_dw_location_entry_t, 1);
 -      new_entry->lowpc = strtoul((char *)xbt_dynar_get_as(split, 1, char *), NULL, 16);
 -      new_entry->highpc = strtoul((char *)xbt_dynar_get_as(split, 2, char *), NULL, 16);
 -      
 -      cursor_remove =0;
 -      while(cursor_remove < 3){
 -        xbt_dynar_remove_at(split, 0, NULL);
 -        cursor_remove++;
 -      }
 -
 -      loc_expr = xbt_str_join(split, " ");
 -      xbt_str_ltrim(loc_expr, "(");
 -      xbt_str_rtrim(loc_expr, ")");
 -      new_entry->location = MC_dwarf_get_location(NULL, loc_expr);
 -
 -      xbt_dynar_push(loclist, &new_entry);
 -
 -      xbt_dynar_free(&split);
 -      free(loc_expr);
 -
 -      read = xbt_getline(&line, &n, fp);
 -      if(read != -1){
 -        line[read - 1] = '\0';
 -        xbt_str_strip_spaces(line);
 -        split = xbt_str_split(line, " ");
 -      }
 -
 -    }
 -
 -
 -    char *key = bprintf("%lu", strtoul((char *)xbt_dynar_get_as(split, 0, char *), NULL, 16));
 -    xbt_dict_set(location_list, key, loclist, NULL);
 -    xbt_free(key);
 -    
 -    xbt_dynar_free(&split);
 -
 -  }
 -
 -  xbt_free(line);
 -  xbt_free(command);
 -  pclose(fp);
 -
 -  return location_list;
 -}
--
 +/** \brief Finds a frame (DW_TAG_subprogram) from an DWARF offset in the rangd of this subprogram
 + *
 + * The offset can be an offset of a child DW_TAG_variable.
 + */
  static dw_frame_t MC_dwarf_get_frame_by_offset(xbt_dict_t all_variables, unsigned long int offset){
  
    xbt_dict_cursor_t cursor = NULL;
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge
Simple merge