lkml.org 
[lkml]   [2012]   [Apr]   [5]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH 2/3] trace-cmd: don't call stop_threads() if doing latency tracing
Date
If we are using a latency tracer we do not call start_threads() we
should therefore not call stop_threads() if 'latency'. Attempting
to call stop_threads() without first calling start_threads() will
cause a segfault since pids will be uninitialized.

Signed-off-by: Mark Asselstine <mark.asselstine@windriver.com>
---
trace-record.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)

diff --git a/trace-record.c b/trace-record.c
index fcec28b..1c56fa9 100644
--- a/trace-record.c
+++ b/trace-record.c
@@ -2216,7 +2216,8 @@ void trace_record (int argc, char **argv)
}

disable_tracing();
- stop_threads();
+ if (!latency)
+ stop_threads();
}

for (cpu = 0; cpu < cpu_count; cpu++) {
--
1.7.5.4


\
 
 \ /
  Last update: 2012-04-05 21:21    [W:0.324 / U:0.336 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site