From: Mark Asselstine <mark.asselstine@windriver.com>
To: <rostedt@goodmis.org>
Cc: <linux-kernel@vger.kernel.org>, <mark.asselstine@windriver.com>
Subject: [PATCH 2/3] trace-cmd: don't call stop_threads() if doing latency tracing
Date: Thu, 5 Apr 2012 15:19:45 -0400 [thread overview]
Message-ID: <1333653586-3379-3-git-send-email-mark.asselstine@windriver.com> (raw)
In-Reply-To: <1333653586-3379-1-git-send-email-mark.asselstine@windriver.com>
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
next prev parent reply other threads:[~2012-04-05 19:19 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-04-05 19:19 [PATCH 0/3] trace-cmd fixes for latency tracing record and report Mark Asselstine
2012-04-05 19:19 ` [PATCH 1/3] trace-cmd: add checks for invalid pointers to fix segfaults Mark Asselstine
2012-04-05 19:19 ` Mark Asselstine [this message]
2012-04-05 19:19 ` [PATCH 3/3] trace-cmd: setting plugin to 'nop' clears data before its recorded Mark Asselstine
2012-04-05 21:37 ` Steven Rostedt
2012-04-06 12:06 ` Mark Asselstine
2012-04-06 12:24 ` Steven Rostedt
2012-04-08 15:38 ` [PATCH v2 3/3] trace-cmd: setting plugin to 'nop' clears data before it's recorded Mark Asselstine
2012-05-23 9:33 ` Steven Rostedt
2012-05-23 13:26 ` Mark Asselstine
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1333653586-3379-3-git-send-email-mark.asselstine@windriver.com \
--to=mark.asselstine@windriver.com \
--cc=linux-kernel@vger.kernel.org \
--cc=rostedt@goodmis.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®