diff options
author | Yordan Karadzhov (VMware) <y.karadz@gmail.com> | 2019-07-09 18:56:45 +0300 |
---|---|---|
committer | Steven Rostedt (VMware) <rostedt@goodmis.org> | 2019-07-09 21:06:15 -0400 |
commit | c403e29c06341e8f6f5e37c90dae3a935ab4fadc (patch) | |
tree | 63bcfc5486f1a000fc2ddcf92febc9c5863acf29 | |
parent | f47fbad421859151a73ab856e0f77d4a9f79527c (diff) | |
download | trace-cmd-c403e29c06341e8f6f5e37c90dae3a935ab4fadc.tar.gz |
kernel-shark: Optimize the command line options used by the capture dialog
Do not include all events belonging to a given system if the whole system
is selected. Add only the name of the system instead. Do not specify a
plugin if the selected plugin is "nop".
Link: http://lore.kernel.org/linux-trace-devel/20190709155650.2345-4-y.karadz@gmail.com
Suggested-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
Signed-off-by: Yordan Karadzhov (VMware) <y.karadz@gmail.com>
Signed-off-by: Steven Rostedt (VMware) <rostedt@goodmis.org>
-rw-r--r-- | kernel-shark/src/KsCaptureDialog.cpp | 21 |
1 files changed, 6 insertions, 15 deletions
diff --git a/kernel-shark/src/KsCaptureDialog.cpp b/kernel-shark/src/KsCaptureDialog.cpp index 7f8cf646..d422e99f 100644 --- a/kernel-shark/src/KsCaptureDialog.cpp +++ b/kernel-shark/src/KsCaptureDialog.cpp @@ -143,23 +143,14 @@ QStringList KsCaptureControl::getArgs() QStringList argv; argv << "record"; - argv << "-p" << _pluginsComboBox.currentText(); - if (_eventsWidget.all()) { - argv << "-e" << "all"; - } else { - QVector<int> evtIds = _eventsWidget.getCheckedIds(); - tep_event *event; + if (_pluginsComboBox.currentText() != "nop") + argv << "-p" << _pluginsComboBox.currentText(); - for (auto const &id: evtIds) { - event = tep_find_event(_localTEP, id); - if (!event) - continue; - - argv << "-e" + QString(event->system) + - ":" + QString(event->name); - } - } + if (_eventsWidget.all()) + argv << "-e" << "all"; + else + argv << _eventsWidget.getCheckedEvents(true); argv << "-o" << outputFileName(); argv << _commandLineEdit.text().split(" "); |