summaryrefslogtreecommitdiff
path: root/libgcc
diff options
context:
space:
mode:
authornathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-01 10:05:42 +0000
committernathan <nathan@138bc75d-0d04-0410-961f-82ee72b054a4>2014-08-01 10:05:42 +0000
commitcb3ea3deaa7ac8dcb1d65eb1ef7e4b4a2d5ed376 (patch)
tree8e8e30935e1249bb36ac049299e6fb8117983da3 /libgcc
parent9c8f71d4dc276f3ae565da139fee5df912608f77 (diff)
downloadgcc-cb3ea3deaa7ac8dcb1d65eb1ef7e4b4a2d5ed376.tar.gz
* Makefile.in (LIBGCOV_MERGE, LIBGCOV_PROFILER,
LIBGCOV_INTERFACE): Reformat. * libgcov-driver.c (gcov_exit, __gcov_init): Disable when IN_GCOV_TOOL. * libgcov-interface.c: Reformat some comments. (__gcov_flush_mx): Add declaration. Tidy up definition. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@213442 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'libgcc')
-rw-r--r--libgcc/ChangeLog9
-rw-r--r--libgcc/Makefile.in16
-rw-r--r--libgcc/libgcov-driver.c3
-rw-r--r--libgcc/libgcov-interface.c27
4 files changed, 34 insertions, 21 deletions
diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog
index 999e1f8879c..8de4ba55857 100644
--- a/libgcc/ChangeLog
+++ b/libgcc/ChangeLog
@@ -1,3 +1,12 @@
+2014-08-01 Nathan Sidwell <nathan@acm.org>
+
+ * Makefile.in (LIBGCOV_MERGE, LIBGCOV_PROFILER,
+ LIBGCOV_INTERFACE): Reformat.
+ * libgcov-driver.c (gcov_exit, __gcov_init): Disable when
+ IN_GCOV_TOOL.
+ * libgcov-interface.c: Reformat some comments.
+ (__gcov_flush_mx): Add declaration. Tidy up definition.
+
2014-07-31 Alan Modra <amodra@gmail.com>
Peter Bergner <bergner@vnet.ibm.com>
diff --git a/libgcc/Makefile.in b/libgcc/Makefile.in
index e86e98de476..f37515ece31 100644
--- a/libgcc/Makefile.in
+++ b/libgcc/Makefile.in
@@ -852,13 +852,15 @@ include $(iterator)
# Build libgcov components.
-LIBGCOV_MERGE = _gcov_merge_add _gcov_merge_single _gcov_merge_delta _gcov_merge_ior \
- _gcov_merge_time_profile
-LIBGCOV_PROFILER = _gcov_interval_profiler _gcov_pow2_profiler _gcov_one_value_profiler \
- _gcov_indirect_call_profiler _gcov_average_profiler _gcov_ior_profiler \
- _gcov_indirect_call_profiler_v2 _gcov_time_profiler
-LIBGCOV_INTERFACE = _gcov_flush _gcov_fork _gcov_execl _gcov_execlp _gcov_execle \
- _gcov_execv _gcov_execvp _gcov_execve _gcov_reset _gcov_dump
+LIBGCOV_MERGE = _gcov_merge_add _gcov_merge_single _gcov_merge_delta \
+ _gcov_merge_ior _gcov_merge_time_profile
+LIBGCOV_PROFILER = _gcov_interval_profiler _gcov_pow2_profiler \
+ _gcov_one_value_profiler _gcov_indirect_call_profiler \
+ _gcov_average_profiler _gcov_ior_profiler \
+ _gcov_indirect_call_profiler_v2 _gcov_time_profiler
+LIBGCOV_INTERFACE = _gcov_flush _gcov_fork _gcov_execl _gcov_execlp \
+ _gcov_execle _gcov_execv _gcov_execvp _gcov_execve _gcov_reset \
+ _gcov_dump
LIBGCOV_DRIVER = _gcov
libgcov-merge-objects = $(patsubst %,%$(objext),$(LIBGCOV_MERGE))
diff --git a/libgcc/libgcov-driver.c b/libgcc/libgcov-driver.c
index 8c2510f1b8b..50755358d6e 100644
--- a/libgcc/libgcov-driver.c
+++ b/libgcc/libgcov-driver.c
@@ -775,6 +775,7 @@ gcov_do_dump (struct gcov_info *list, int run_counted)
free (gf.filename);
}
+#if !IN_GCOV_TOOL
void
gcov_exit (void)
{
@@ -840,6 +841,6 @@ __gcov_init (struct gcov_info *info)
}
info->version = 0;
}
-
+#endif /* !IN_GCOV_TOOL */
#endif /* L_gcov */
#endif /* inhibit_libc */
diff --git a/libgcc/libgcov-interface.c b/libgcc/libgcov-interface.c
index a1a91f2567c..d4a7f50c22f 100644
--- a/libgcc/libgcov-interface.c
+++ b/libgcc/libgcov-interface.c
@@ -44,20 +44,21 @@ void __gcov_dump (void) {}
extern void gcov_clear (void) ATTRIBUTE_HIDDEN;
extern void gcov_exit (void) ATTRIBUTE_HIDDEN;
+extern __gthread_mutex_t __gcov_flush_mx ATTRIBUTE_HIDDEN;
#ifdef L_gcov_flush
-
#ifdef __GTHREAD_MUTEX_INIT
-ATTRIBUTE_HIDDEN __gthread_mutex_t __gcov_flush_mx = __GTHREAD_MUTEX_INIT;
+__gthread_mutex_t __gcov_flush_mx = __GTHREAD_MUTEX_INIT;
#define init_mx_once()
#else
-__gthread_mutex_t __gcov_flush_mx ATTRIBUTE_HIDDEN;
+__gthread_mutex_t __gcov_flush_mx;
static void
init_mx (void)
{
__GTHREAD_MUTEX_INIT_FUNCTION (&__gcov_flush_mx);
}
+
static void
init_mx_once (void)
{
@@ -160,8 +161,8 @@ __gcov_execl (const char *path, char *arg, ...)
#endif
#ifdef L_gcov_execlp
-/* A wrapper for the execlp function. Flushes the accumulated profiling data, so
- that they are not lost. */
+/* A wrapper for the execlp function. Flushes the accumulated
+ profiling data, so that they are not lost. */
int
__gcov_execlp (const char *path, char *arg, ...)
@@ -191,8 +192,8 @@ __gcov_execlp (const char *path, char *arg, ...)
#endif
#ifdef L_gcov_execle
-/* A wrapper for the execle function. Flushes the accumulated profiling data, so
- that they are not lost. */
+/* A wrapper for the execle function. Flushes the accumulated
+ profiling data, so that they are not lost. */
int
__gcov_execle (const char *path, char *arg, ...)
@@ -224,8 +225,8 @@ __gcov_execle (const char *path, char *arg, ...)
#endif
#ifdef L_gcov_execv
-/* A wrapper for the execv function. Flushes the accumulated profiling data, so
- that they are not lost. */
+/* A wrapper for the execv function. Flushes the accumulated
+ profiling data, so that they are not lost. */
int
__gcov_execv (const char *path, char *const argv[])
@@ -236,8 +237,8 @@ __gcov_execv (const char *path, char *const argv[])
#endif
#ifdef L_gcov_execvp
-/* A wrapper for the execvp function. Flushes the accumulated profiling data, so
- that they are not lost. */
+/* A wrapper for the execvp function. Flushes the accumulated
+ profiling data, so that they are not lost. */
int
__gcov_execvp (const char *path, char *const argv[])
@@ -248,8 +249,8 @@ __gcov_execvp (const char *path, char *const argv[])
#endif
#ifdef L_gcov_execve
-/* A wrapper for the execve function. Flushes the accumulated profiling data, so
- that they are not lost. */
+/* A wrapper for the execve function. Flushes the accumulated
+ profiling data, so that they are not lost. */
int
__gcov_execve (const char *path, char *const argv[], char *const envp[])