|
From: <sv...@va...> - 2009-06-21 09:26:40
|
Author: bart
Date: 2009-06-21 10:26:27 +0100 (Sun, 21 Jun 2009)
New Revision: 10354
Log:
Updated code for statistics printed by --drd-stats=yes.
Modified:
trunk/drd/drd_main.c
trunk/drd/drd_thread.c
trunk/drd/drd_thread.h
Modified: trunk/drd/drd_main.c
===================================================================
--- trunk/drd/drd_main.c 2009-06-20 17:42:59 UTC (rev 10353)
+++ trunk/drd/drd_main.c 2009-06-21 09:26:27 UTC (rev 10354)
@@ -575,35 +575,25 @@
// thread_print_all();
if (VG_(clo_verbosity) > 1 || DRD_(s_print_stats))
{
- ULong update_conflict_set_count;
- ULong dsnsc;
- ULong dscvc;
-
- update_conflict_set_count
- = DRD_(thread_get_update_conflict_set_count)(&dsnsc, &dscvc);
-
VG_(message)(Vg_UserMsg,
- " thread: %lld context switches"
- " / %lld updates of the conflict set",
- DRD_(thread_get_context_switch_count)(),
- update_conflict_set_count);
+ " thread: %lld context switches",
+ DRD_(thread_get_context_switch_count)());
VG_(message)(Vg_UserMsg,
- " (%lld new sg + %lld combine vc + %lld csw).",
- dsnsc,
- dscvc,
- update_conflict_set_count - dsnsc - dscvc);
+ "confl set: %lld full updates and %lld partial updates.",
+ DRD_(thread_get_compute_conflict_set_count)(),
+ DRD_(thread_get_update_conflict_set_count)());
VG_(message)(Vg_UserMsg,
" segments: created %lld segments, max %lld alive,"
- " %lld discard points.",
+ " %lld discard points",
DRD_(sg_get_segments_created_count)(),
DRD_(sg_get_max_segments_alive_count)(),
DRD_(thread_get_discard_ordered_segments_count)());
VG_(message)(Vg_UserMsg,
- " %lld merges",
+ " and %lld merges.",
DRD_(sg_get_segment_merge_count)());
VG_(message)(Vg_UserMsg,
- " (%lld mutex, %lld rwlock, %lld semaphore,"
- " %lld barrier).",
+ "segmnt cr: %lld mutex, %lld rwlock, %lld semaphore and"
+ " %lld barrier.",
DRD_(get_mutex_segment_creation_count)(),
DRD_(get_rwlock_segment_creation_count)(),
DRD_(get_semaphore_segment_creation_count)(),
Modified: trunk/drd/drd_thread.c
===================================================================
--- trunk/drd/drd_thread.c 2009-06-20 17:42:59 UTC (rev 10353)
+++ trunk/drd/drd_thread.c 2009-06-21 09:26:27 UTC (rev 10354)
@@ -59,9 +59,8 @@
static ULong s_context_switch_count;
static ULong s_discard_ordered_segments_count;
+static ULong s_compute_conflict_set_count;
static ULong s_update_conflict_set_count;
-static ULong s_conflict_set_new_segment_count;
-static ULong s_conflict_set_combine_vc_count;
static ULong s_conflict_set_bitmap_creation_count;
static ULong s_conflict_set_bitmap2_creation_count;
static ThreadId s_vg_running_tid = VG_INVALID_THREADID;
@@ -1263,7 +1262,7 @@
&& tid != DRD_INVALID_THREADID);
tl_assert(tid == DRD_(g_drd_running_tid));
- s_update_conflict_set_count++;
+ s_compute_conflict_set_count++;
s_conflict_set_bitmap_creation_count
-= DRD_(bm_get_bitmap_creation_count)();
s_conflict_set_bitmap2_creation_count
@@ -1452,7 +1451,7 @@
DRD_(bm_remove_cleared_marked)(DRD_(g_conflict_set));
- s_conflict_set_combine_vc_count++;
+ s_update_conflict_set_count++;
if (s_trace_conflict_set_bm)
{
@@ -1476,13 +1475,15 @@
return s_discard_ordered_segments_count;
}
-/** Return how many times the conflict set has been updated. */
-ULong DRD_(thread_get_update_conflict_set_count)(ULong* dsnsc, ULong* dscvc)
+/** Return how many times the conflict set has been updated entirely. */
+ULong DRD_(thread_get_compute_conflict_set_count)()
{
- tl_assert(dsnsc);
- tl_assert(dscvc);
- *dsnsc = s_conflict_set_new_segment_count;
- *dscvc = s_conflict_set_combine_vc_count;
+ return s_compute_conflict_set_count;
+}
+
+/** Return how many times the conflict set has been updated partially. */
+ULong DRD_(thread_get_update_conflict_set_count)(void)
+{
return s_update_conflict_set_count;
}
Modified: trunk/drd/drd_thread.h
===================================================================
--- trunk/drd/drd_thread.h 2009-06-20 17:42:59 UTC (rev 10353)
+++ trunk/drd/drd_thread.h 2009-06-21 09:26:27 UTC (rev 10354)
@@ -175,7 +175,8 @@
ULong DRD_(thread_get_context_switch_count)(void);
ULong DRD_(thread_get_report_races_count)(void);
ULong DRD_(thread_get_discard_ordered_segments_count)(void);
-ULong DRD_(thread_get_update_conflict_set_count)(ULong* dsnsc, ULong* dscvc);
+ULong DRD_(thread_get_compute_conflict_set_count)(void);
+ULong DRD_(thread_get_update_conflict_set_count)(void);
ULong DRD_(thread_get_conflict_set_bitmap_creation_count)(void);
ULong DRD_(thread_get_conflict_set_bitmap2_creation_count)(void);
|