From: "Vladislav Valtchev (VMware)" <vladislav.valtchev@gmail.com>
To: rostedt@goodmis.org, linux-kernel@vger.kernel.org
Cc: "Vladislav Valtchev (VMware)" <vladislav.valtchev@gmail.com>
Subject: [PATCH 1/3] trace-cmd: Fix err msg for record w/o the -e option
Date: Wed, 22 Nov 2017 20:02:00 +0200 [thread overview]
Message-ID: <20171122180202.9519-2-vladislav.valtchev@gmail.com> (raw)
In-Reply-To: <20171122180202.9519-1-vladislav.valtchev@gmail.com>
Currently, running just `trace-cmd record` without telling which events have to
be traced (-e) nor which tracer to use (-p), trace-cmd dies with the message:
No instances reference??
Which might not be helpful to new users of the tool. This small patch removes
an early check in trace_record() allowing, in the same case, the execution to
continue a few more statements and fail more gracefully in the function
check_doing_something() with the following message:
no event or plugin was specified... aborting
Signed-off-by: Vladislav Valtchev (VMware) <vladislav.valtchev@gmail.com>
---
trace-record.c | 6 ++----
1 file changed, 2 insertions(+), 4 deletions(-)
diff --git a/trace-record.c b/trace-record.c
index 06fc0e6..e2fb731 100644
--- a/trace-record.c
+++ b/trace-record.c
@@ -4722,11 +4722,9 @@ void trace_record (int argc, char **argv)
* If top_instance doesn't have any plugins or events, then
* remove it from being processed.
*/
- if (!extract && !__check_doing_something(&top_instance)) {
- if (!buffer_instances)
- die("No instances reference??");
+ if (!extract && !__check_doing_something(&top_instance))
first_instance = buffer_instances;
- } else
+ else
topt = 1;
update_first_instance(instance, topt);
--
2.14.1
next prev parent reply other threads:[~2017-11-22 18:03 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-11-22 18:01 [PATCH 0/3] trace-cmd: fixing three minor user experience issues Vladislav Valtchev (VMware)
2017-11-22 18:02 ` Vladislav Valtchev (VMware) [this message]
2017-11-22 18:02 ` [PATCH 2/3] trace-cmd: s/plugin/tracer/ in record's man page Vladislav Valtchev (VMware)
2017-11-22 18:02 ` [PATCH 3/3] trace-cmd: Making stat to report when the stack tracer is ON Vladislav Valtchev (VMware)
2017-11-22 19:50 ` Steven Rostedt
2017-11-23 12:32 ` Vladislav Valtchev
2017-11-29 12:57 ` Steven Rostedt
2017-11-29 14:00 ` Vladislav Valtchev
2017-11-29 16:18 ` Steven Rostedt
2017-11-30 11:26 ` Vladislav Valtchev
2017-11-30 14:56 ` Steven Rostedt
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=20171122180202.9519-2-vladislav.valtchev@gmail.com \
--to=vladislav.valtchev@gmail.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
Powered by JetHome