Merge pull request #3110 from BrzVlad/fix-complex-conc-scan
authorRodrigo Kumpera <kumpera@gmail.com>
Tue, 7 Jun 2016 18:38:27 +0000 (11:38 -0700)
committerRodrigo Kumpera <kumpera@gmail.com>
Tue, 7 Jun 2016 18:38:27 +0000 (11:38 -0700)
[sgen] Fix concurrent scan of complex objects

1  2 
mono/sgen/sgen-gc.h

diff --combined mono/sgen/sgen-gc.h
index 3a86cc44f5f9bd077365a6525a26fc1f1735c373,94b453b6e279352ad5be9405919caa66257513a9..9ebd40c0d315c92101c79aea2fa95c00c3c7fbb5
@@@ -116,16 -116,40 +116,16 @@@ extern guint64 stat_objects_copied_majo
                g_error (__VA_ARGS__);  \
  } } while (0)
  
 -#ifndef HOST_WIN32
 -# define LOG_TIMESTAMP  \
 -      do {    \
 -              time_t t;                                                                       \
 -              struct tm tod;                                                                  \
 -              time(&t);                                                                       \
 -              localtime_r(&t, &tod);                                                          \
 -              strftime(logTime, sizeof(logTime), "%Y-%m-%d %H:%M:%S", &tod);                  \
 -      } while (0)
 -#else
 -# define LOG_TIMESTAMP  \
 -      do {    \
 -              time_t t;                                                                       \
 -              struct tm *tod;                                                                 \
 -              time(&t);                                                                       \
 -              tod = localtime(&t);                                                            \
 -              strftime(logTime, sizeof(logTime), "%F %T", tod);                               \
 -      } while (0)
 -#endif
  
  #define SGEN_LOG(level, format, ...) do {      \
        if (G_UNLIKELY ((level) <= SGEN_MAX_DEBUG_LEVEL && (level) <= gc_debug_level)) {        \
 -              char logTime[80];                                                               \
 -              LOG_TIMESTAMP;                                                                  \
 -              mono_gc_printf (gc_debug_file, "%s " format "\n", logTime, ##__VA_ARGS__);      \
 +              mono_gc_printf (gc_debug_file, format "\n", ##__VA_ARGS__);     \
  } } while (0)
  
  #define SGEN_COND_LOG(level, cond, format, ...) do {  \
 -      if (G_UNLIKELY ((level) <= SGEN_MAX_DEBUG_LEVEL && (level) <= gc_debug_level)) {                \
 -              if (cond) {                                                                             \
 -                      char logTime[80];                                                               \
 -                      LOG_TIMESTAMP;                                                                  \
 -                      mono_gc_printf (gc_debug_file, "%s " format "\n", logTime, ##__VA_ARGS__);      \
 -              }                                                                                       \
 +      if (G_UNLIKELY ((level) <= SGEN_MAX_DEBUG_LEVEL && (level) <= gc_debug_level)) {        \
 +              if (cond)       \
 +                      mono_gc_printf (gc_debug_file, format "\n", ##__VA_ARGS__);     \
  } } while (0)
  
  extern int gc_debug_level;
@@@ -316,6 -340,7 +316,7 @@@ enum 
        INTERNAL_MEM_BINARY_PROTOCOL,
        INTERNAL_MEM_TEMPORARY,
        INTERNAL_MEM_LOG_ENTRY,
+       INTERNAL_MEM_COMPLEX_DESCRIPTORS,
        INTERNAL_MEM_FIRST_CLIENT
  };