mirror of
https://github.com/torvalds/linux.git
synced 2026-03-08 04:04:43 +01:00
perf record: Use evlist__new_default when no events specified
Rather than distributing the code doing similar things to evlist__new_default, use the one implementation so that paranoia and wildcard scanning can be optimized. Signed-off-by: Ian Rogers <irogers@google.com> Tested-by: James Clark <james.clark@linaro.org> Signed-off-by: Namhyung Kim <namhyung@kernel.org>
This commit is contained in:
parent
b1c5efbfd9
commit
3d3056a105
1 changed files with 6 additions and 2 deletions
|
|
@ -4341,9 +4341,13 @@ int cmd_record(int argc, const char **argv)
|
|||
record.opts.tail_synthesize = true;
|
||||
|
||||
if (rec->evlist->core.nr_entries == 0) {
|
||||
err = parse_event(rec->evlist, "cycles:P");
|
||||
if (err)
|
||||
struct evlist *def_evlist = evlist__new_default();
|
||||
|
||||
if (!def_evlist)
|
||||
goto out;
|
||||
|
||||
evlist__splice_list_tail(rec->evlist, &def_evlist->core.entries);
|
||||
evlist__delete(def_evlist);
|
||||
}
|
||||
|
||||
if (rec->opts.target.tid && !rec->opts.no_inherit_set)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue