diff options
author | Lawrence L Love <lawrencex.l.love@intel.com> | 2013-12-05 11:31:16 -0800 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2013-12-10 18:15:31 +0000 |
commit | 5ab982d724e2a51f84fdf74ac3d45ae2e223f862 (patch) | |
tree | 86d1be2244b06f7c025c576d8eb65c3ba69a555d /cli/cli_dump.cpp | |
parent | be6bb68285002607d1c9511bb4f6dccc84495456 (diff) |
apitrace: Allow multiple --calls and/or --frames input options
Input for multiple files or ranges that seemed intuitive did not work
Only initialize CallSet list on first option call. If the option is
repeatedly used, continue adding to the same list.
e.g., apitrace trim --calls=@foo.calls --calls=0-20 --calls=...
The "CallSet::CallSet(const char *string)" constructor determined if the
option was a file or a range and then made the relative call to populate
the CallSet list. Rename that constructor to a public member function
"CallSet::merge(const char *string)" and call it from the command line
parser istead of constructing a new object each time the option is used.
In the renamed "merge" function, add a check to create the new CallSet
object only when the option is called the first time.
Modified modules that use this option: trim, dump, pickle, retrace
Signed-off-by: Lawrence L Love <lawrencex.l.love@intel.com>
Diffstat (limited to 'cli/cli_dump.cpp')
-rw-r--r-- | cli/cli_dump.cpp | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cli/cli_dump.cpp b/cli/cli_dump.cpp index f37c027f..abbffc8d 100644 --- a/cli/cli_dump.cpp +++ b/cli/cli_dump.cpp @@ -115,7 +115,7 @@ command(int argc, char *argv[]) verbose = true; break; case CALLS_OPT: - calls = trace::CallSet(optarg); + calls.merge(optarg); break; case COLOR_OPT: if (!optarg || |