|
From: <sv...@va...> - 2008-06-06 10:18:23
|
Author: bart
Date: 2008-06-06 11:18:24 +0100 (Fri, 06 Jun 2008)
New Revision: 8195
Log:
Enable more optimization opportunities.
Modified:
trunk/exp-drd/Makefile.am
trunk/exp-drd/drd_main.c
trunk/exp-drd/drd_thread.c
trunk/exp-drd/drd_thread.h
Modified: trunk/exp-drd/Makefile.am
===================================================================
--- trunk/exp-drd/Makefile.am 2008-06-06 10:17:26 UTC (rev 8194)
+++ trunk/exp-drd/Makefile.am 2008-06-06 10:18:24 UTC (rev 8195)
@@ -97,11 +97,8 @@
drd_malloc_wrappers.c \
drd_mutex.c \
drd_rwlock.c \
- drd_segment.c \
drd_semaphore.c \
- drd_suppression.c \
- drd_thread.c \
- drd_vc.c
+ drd_suppression.c
noinst_HEADERS = \
drd_barrier.h \
Modified: trunk/exp-drd/drd_main.c
===================================================================
--- trunk/exp-drd/drd_main.c 2008-06-06 10:17:26 UTC (rev 8194)
+++ trunk/exp-drd/drd_main.c 2008-06-06 10:18:24 UTC (rev 8195)
@@ -54,6 +54,15 @@
#include "pub_tool_tooliface.h"
+/* Include several source files here in order to allow the compiler to */
+/* do more inlining. */
+#include "drd_bitmap.c"
+#include "drd_segment.c"
+#include "drd_thread.c"
+#include "drd_vc.c"
+
+
+
// Function declarations.
static void drd_start_client_code(const ThreadId tid, const ULong bbs_done);
Modified: trunk/exp-drd/drd_thread.c
===================================================================
--- trunk/exp-drd/drd_thread.c 2008-06-06 10:17:26 UTC (rev 8194)
+++ trunk/exp-drd/drd_thread.c 2008-06-06 10:18:24 UTC (rev 8195)
@@ -39,9 +39,6 @@
#include "pub_tool_options.h" // VG_(clo_backtrace_size)
#include "pub_tool_threadstate.h" // VG_(get_pthread_id)()
-/* Include the drd_bitmap.c source file here to allow the compiler to */
-/* inline the bitmap manipulation functions called from this source file. */
-#include "drd_bitmap.c"
// Local functions.
@@ -89,14 +86,6 @@
s_segment_merging = m;
}
-__inline__ Bool IsValidDrdThreadId(const DrdThreadId tid)
-{
- return (0 <= (int)tid && tid < DRD_N_THREADS && tid != DRD_INVALID_THREADID
- && ! (s_threadinfo[tid].vg_thread_exists == False
- && s_threadinfo[tid].posix_thread_exists == False
- && s_threadinfo[tid].detached_posix_thread == False));
-}
-
/**
* Convert Valgrind's ThreadId into a DrdThreadId. Report failure if
* Valgrind's ThreadId does not yet exist.
Modified: trunk/exp-drd/drd_thread.h
===================================================================
--- trunk/exp-drd/drd_thread.h 2008-06-06 10:17:26 UTC (rev 8194)
+++ trunk/exp-drd/drd_thread.h 2008-06-06 10:18:24 UTC (rev 8195)
@@ -92,7 +92,6 @@
void thread_trace_context_switches(const Bool t);
void thread_trace_danger_set(const Bool t);
void thread_set_segment_merging(const Bool m);
-Bool IsValidDrdThreadId(const DrdThreadId tid);
DrdThreadId VgThreadIdToDrdThreadId(const ThreadId tid);
DrdThreadId NewVgThreadIdToDrdThreadId(const ThreadId tid);
@@ -154,6 +153,15 @@
ULong thread_get_danger_set_bitmap2_creation_count(void);
+static __inline__
+Bool IsValidDrdThreadId(const DrdThreadId tid)
+{
+ return (0 <= (int)tid && tid < DRD_N_THREADS && tid != DRD_INVALID_THREADID
+ && ! (s_threadinfo[tid].vg_thread_exists == False
+ && s_threadinfo[tid].posix_thread_exists == False
+ && s_threadinfo[tid].detached_posix_thread == False));
+}
+
static inline
DrdThreadId thread_get_running_tid(void)
{
|