From: Arnaldo Carvalho de Melo <acme@infradead.org>
To: Ingo Molnar <mingo@elte.hu>
Cc: linux-kernel@vger.kernel.org,
"Arnaldo Carvalho de Melo" <acme@redhat.com>,
"Frédéric Weisbecker" <fweisbec@gmail.com>,
"Mike Galbraith" <efault@gmx.de>,
"Paul Mackerras" <paulus@samba.org>,
"Peter Zijlstra" <a.p.zijlstra@chello.nl>,
"Tom Zanussi" <tzanussi@gmail.com>
Subject: [PATCH 4/5] perf record: Don't exit in live mode when no tracepoints are enabled
Date: Sun, 2 May 2010 19:59:01 -0300 [thread overview]
Message-ID: <1272841142-26029-5-git-send-email-acme@infradead.org> (raw)
In-Reply-To: <1272841142-26029-1-git-send-email-acme@infradead.org>
From: Arnaldo Carvalho de Melo <acme@redhat.com>
With this I was able to actually test Tom Zanussi's two previous patches
in my usual perf testing ways, i.e. without any tracepoints activated.
Cc: Frédéric Weisbecker <fweisbec@gmail.com>
Cc: Mike Galbraith <efault@gmx.de>
Cc: Paul Mackerras <paulus@samba.org>
Cc: Peter Zijlstra <a.p.zijlstra@chello.nl>
Cc: Tom Zanussi <tzanussi@gmail.com>
LKML-Reference: <new-submission>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
tools/perf/builtin-record.c | 15 +++++++++------
1 files changed, 9 insertions(+), 6 deletions(-)
diff --git a/tools/perf/builtin-record.c b/tools/perf/builtin-record.c
index e382d93..ac989e9 100644
--- a/tools/perf/builtin-record.c
+++ b/tools/perf/builtin-record.c
@@ -666,12 +666,15 @@ static int __cmd_record(int argc, const char **argv)
nr_counters,
process_synthesized_event,
session);
- if (err <= 0) {
- pr_err("Couldn't record tracing data.\n");
- return err;
- }
-
- advance_output(err);
+ /*
+ * FIXME err <= 0 here actually means that there were no tracepoints
+ * so its not really an error, just that we don't need to synthesize
+ * anything.
+ * We really have to return this more properly and also propagate
+ * errors that now are calling die()
+ */
+ if (err > 0)
+ advance_output(err);
}
machine = perf_session__find_host_machine(session);
--
1.6.2.5
next prev parent reply other threads:[~2010-05-02 22:59 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-05-02 22:58 [PATCH 0/5] perf inject + say no to __KERNEL__ only stuff Arnaldo Carvalho de Melo
2010-05-02 22:58 ` [PATCH 1/5] perf tools: Don't use code surrounded by __KERNEL__ Arnaldo Carvalho de Melo
2010-05-02 22:58 ` [PATCH 2/5] perf/live: don't synthesize build ids at the end of a live mode trace Arnaldo Carvalho de Melo
2010-05-02 22:59 ` [PATCH 3/5] perf: add perf-inject builtin Arnaldo Carvalho de Melo
2010-05-02 22:59 ` Arnaldo Carvalho de Melo [this message]
2010-05-03 5:51 ` [PATCH 4/5] perf record: Don't exit in live mode when no tracepoints are enabled Tom Zanussi
2010-05-03 13:23 ` Arnaldo Carvalho de Melo
2010-05-02 22:59 ` [PATCH 5/5] perf inject: Refactor read_buildid function Arnaldo Carvalho de Melo
2010-05-03 6:24 ` [PATCH 0/5] perf inject + say no to __KERNEL__ only stuff Ingo Molnar
2010-05-03 6:29 ` H. Peter Anvin
2010-05-03 6:54 ` Ingo Molnar
2010-05-03 7:37 ` Ingo Molnar
2010-05-03 8:13 ` Borislav Petkov
2010-05-03 13:06 ` Ingo Molnar
2010-05-03 13:07 ` Borislav Petkov
2010-05-04 17:27 ` [tip:core/hweight] arch, hweight: Fix compilation errors tip-bot for Borislav Petkov
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=1272841142-26029-5-git-send-email-acme@infradead.org \
--to=acme@infradead.org \
--cc=a.p.zijlstra@chello.nl \
--cc=acme@redhat.com \
--cc=efault@gmx.de \
--cc=fweisbec@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=paulus@samba.org \
--cc=tzanussi@gmail.com \
/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;
as well as URLs for NNTP newsgroup(s).