|
From: <sv...@va...> - 2014-08-26 19:56:19
|
Author: florian
Date: Tue Aug 26 19:56:12 2014
New Revision: 14366
Log:
Use VG_(gdb_printf) directly without intermediate buffering.
Modified:
branches/BUF_REMOVAL/callgrind/main.c
Modified: branches/BUF_REMOVAL/callgrind/main.c
==============================================================================
--- branches/BUF_REMOVAL/callgrind/main.c (original)
+++ branches/BUF_REMOVAL/callgrind/main.c Tue Aug 26 19:56:12 2014
@@ -1522,7 +1522,6 @@
/* Dump current state */
static void dump_state_togdb(void)
{
- static HChar buf[512];
thread_info** th;
int t, p;
Int orig_tid = CLG_(current_tid);
@@ -1546,12 +1545,11 @@
/* threads */
th = CLG_(get_threads)();
- p = VG_(sprintf)(buf, "threads:");
+ VG_(gdb_printf)("threads:");
for(t=1;t<VG_N_THREADS;t++) {
if (!th[t]) continue;
- p += VG_(sprintf)(buf+p, " %d", t);
+ VG_(gdb_printf)(" %d", t);
}
- VG_(gdb_printf)("%s\n", buf);
VG_(gdb_printf)("current-tid: %d\n", orig_tid);
CLG_(forall_threads)(dump_state_of_thread_togdb);
}
|