]> granicus.if.org Git - gc/commitdiff
2009-10-18 Ivan Maidanski <ivmai@mail.ru>
authorivmai <ivmai>
Sun, 18 Oct 2009 08:46:08 +0000 (08:46 +0000)
committerIvan Maidanski <ivmai@mail.ru>
Tue, 26 Jul 2011 17:06:50 +0000 (21:06 +0400)
* backgraph.c (GC_quiet): Remove the declaration (not needed
anymore since gc_priv.h is always included).
* checksums.c (GC_quiet): Ditto.
* gcj_mlc.c (GC_quiet): Ditto.
* headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
comment.
* include/private/gc_hdrs.h (GC_hdr_cache_hits,
GC_hdr_cache_misses): Ditto.
* mark.c (GC_first_nonempty): Make the volatile variable STATIC.
* pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
Ditto.
* win32_threads.c (GC_please_stop, GC_max_thread_index,
GC_mark_mutex_waitcnt): Ditto.

ChangeLog
backgraph.c
checksums.c
gcj_mlc.c
headers.c
include/private/gc_hdrs.h
mark.c
pthread_stop_world.c
win32_threads.c

index 749c4be4c1c2591e6eb438686c6920ca1a6b5156..c640691a05f2788532de6a05a5b53b5754855031 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2009-10-18  Ivan Maidanski <ivmai@mail.ru>
+
+       * backgraph.c (GC_quiet): Remove the declaration (not needed
+       anymore since gc_priv.h is always included).
+       * checksums.c (GC_quiet): Ditto.
+       * gcj_mlc.c (GC_quiet): Ditto.
+       * headers.c (GC_hdr_cache_hits, GC_hdr_cache_misses): Add the
+       comment.
+       * include/private/gc_hdrs.h (GC_hdr_cache_hits,
+       GC_hdr_cache_misses): Ditto.
+       * mark.c (GC_first_nonempty): Make the volatile variable STATIC.
+       * pthread_stop_world.c (GC_stop_count, GC_world_is_stopped):
+       Ditto.
+       * win32_threads.c (GC_please_stop, GC_max_thread_index,
+       GC_mark_mutex_waitcnt): Ditto.
+
 2009-10-18  Ivan Maidanski <ivmai@mail.ru>
 
        * pthread_support.c (GC_USE_LD_WRAP): Fix a typo (swapped 'L' and
index a45586975964b341be0c1027065f735210c59d63..c3cea439724ec1832f0c84df0164ca926d4d51f9 100644 (file)
@@ -476,9 +476,4 @@ void GC_print_back_graph_stats(void)
   GC_deepest_obj = 0;
 }
 
-#else  /* !MAKE_BACK_GRAPH */
-
-extern int GC_quiet;
-        /* ANSI C doesn't allow translation units to be empty.  */
-
 #endif /* !MAKE_BACK_GRAPH */
index d9b26d0deed4d93643cf9559214462a80879f874..44f7c7e14ce5a37bcd6fb10703406a29b21964c9 100644 (file)
@@ -12,9 +12,9 @@
  */
 /* Boehm, March 29, 1995 12:51 pm PST */
 
-# include "private/gc_priv.h"
+#include "private/gc_priv.h"
 
-# ifdef CHECKSUMS
+#ifdef CHECKSUMS
 
 /* This is debugging code intended to verify the results of dirty bit   */
 /* computations. Works only in a single threaded environment.           */
@@ -222,10 +222,4 @@ out:
     GC_n_faulted = 0;
 }
 
-# else
-
-extern int GC_quiet;
-        /* ANSI C doesn't allow translation units to be empty.  */
-        /* So we guarantee this one is nonempty.                */
-
-# endif /* CHECKSUMS */
+#endif /* CHECKSUMS */
index 265252d59643598ece73476a43543a44d2b51040..e5c0bacab1ce7050a0a3bba235ab0910887edd4e 100644 (file)
--- a/gcj_mlc.c
+++ b/gcj_mlc.c
@@ -269,9 +269,4 @@ GC_API void * GC_CALL GC_gcj_malloc_ignore_off_page(size_t lb,
     return((void *) op);
 }
 
-#else
-
-extern int GC_quiet;
-        /* ANSI C doesn't allow translation units to be empty.  */
-
 #endif  /* GC_GCJ_SUPPORT */
index 82a60f567969fa3bd1bc75a78c0ab789fa43a184..3f0273a5b67689aea41f47f787d59271b4fe27d4 100644 (file)
--- a/headers.c
+++ b/headers.c
@@ -185,6 +185,7 @@ GC_INLINE void free_hdr(hdr * hhdr)
 }
 
 #ifdef COUNT_HDR_CACHE_HITS
+  /* Used for debugging/profiling (the symbols are externally visible). */
   word GC_hdr_cache_hits = 0;
   word GC_hdr_cache_misses = 0;
 #endif
index 1e5845da32e44c6697d0ca1f7ae9c4cffec654cf..86b5fbcd45bcc54fc2393ad2a401ebb80e7358d1 100644 (file)
@@ -57,7 +57,7 @@ typedef struct hblkhdr hdr;
 /* #define COUNT_HDR_CACHE_HITS  */
 
 # ifdef COUNT_HDR_CACHE_HITS
-    extern word GC_hdr_cache_hits;
+    extern word GC_hdr_cache_hits; /* used for debugging/profiling */
     extern word GC_hdr_cache_misses;
 #   define HC_HIT() ++GC_hdr_cache_hits
 #   define HC_MISS() ++GC_hdr_cache_misses
diff --git a/mark.c b/mark.c
index 5320a49afc102aa28484b06028e5f6ef618a1df8..208d95931e48f970b11079120c5accea7ae8937a 100644 (file)
--- a/mark.c
+++ b/mark.c
@@ -114,7 +114,7 @@ size_t GC_mark_stack_size = 0;
 #ifdef PARALLEL_MARK
   mse * volatile GC_mark_stack_top = NULL;
   /* Updated only with mark lock held, but read asynchronously. */
-  volatile AO_t GC_first_nonempty;
+  STATIC volatile AO_t GC_first_nonempty = 0;
         /* Lowest entry on mark stack   */
         /* that may be nonempty.        */
         /* Updated only by initiating   */
index 6f2ceff06ae4e19c0ba0f6d45c44b467d046d098..865b436f9a3ac2ce1408afad513f00d2d8917c11 100644 (file)
@@ -85,10 +85,10 @@ STATIC void GC_remove_allowed_signals(sigset_t *set)
 
 static sigset_t suspend_handler_mask;
 
-volatile AO_t GC_stop_count = 0;
+STATIC volatile AO_t GC_stop_count = 0;
                         /* Incremented at the beginning of GC_stop_world. */
 
-volatile AO_t GC_world_is_stopped = FALSE;
+STATIC volatile AO_t GC_world_is_stopped = FALSE;
                         /* FALSE ==> it is safe for threads to restart, i.e. */
                         /* they will see another suspend signal before they  */
                         /* are expected to stop (unless they have voluntarily */
index cc2b61dc87fa63c2920ca62b3f3475313c362885..47b3724a21a0f79d0da22b05c8e025e0453feaf1 100644 (file)
@@ -261,7 +261,7 @@ typedef volatile struct GC_Thread_Rep * GC_vthread;
  * volatiles.  This code should consistently use atomic_ops.
  */
 
-volatile GC_bool GC_please_stop = FALSE;
+STATIC volatile GC_bool GC_please_stop = FALSE;
 
 /*
  * We track thread attachments while the world is supposed to be stopped.
@@ -305,7 +305,7 @@ GC_bool GC_started_thread_while_stopped(void)
 /* since we look them up with sequential search.                */
 volatile struct GC_Thread_Rep dll_thread_table[MAX_THREADS];
 
-volatile LONG GC_max_thread_index = 0;
+STATIC volatile LONG GC_max_thread_index = 0;
                         /* Largest index in dll_thread_table    */
                         /* that was ever used.                  */
 
@@ -1727,8 +1727,8 @@ void GC_get_next_stack(char *start, char *limit,
                                 /* -1 - locked and waiters may exist.   */
                                 /* Accessed by InterlockedExchange().   */
 #   else
-      volatile AO_t GC_mark_mutex_waitcnt = 0; /* Number of waiters + 1; */
-                                               /* 0 - unlocked.          */
+      STATIC volatile AO_t GC_mark_mutex_waitcnt = 0;
+                                /* Number of waiters + 1; 0 - unlocked. */
 #   endif
 
     /* #define LOCK_STATS */