diff options
| author | Dan Williams <dan.j.williams@intel.com> | 2019-03-11 15:37:55 -0400 |
|---|---|---|
| committer | Dan Williams <dan.j.williams@intel.com> | 2019-03-11 15:37:55 -0400 |
| commit | 4083014e32699af04a8e6eaa4855b08dba36a47a (patch) | |
| tree | fa37f9f9691fe64ca8a3c0cdc0315dc12462e6e4 /tools/perf/builtin-script.c | |
| parent | 6fd96ff557963de8e62842a0dc360a6e3610d2bb (diff) | |
| parent | 78153dd45e7e0596ba32b15d02bda08e1513111e (diff) | |
Merge branch 'for-5.1/nfit/ars' into libnvdimm-for-next
Merge several updates to the ARS implementation. Highlights include:
* Support retrieval of short-ARS results if the ARS state is "requires
continuation", and even if the "no_init_ars" module parameter is
specified.
* Allow busy-polling of the kernel ARS state by allowing root to reset
the exponential back-off timer.
* Filter potentially stale ARS results by tracking query-ARS relative to
the previous start-ARS.
Diffstat (limited to 'tools/perf/builtin-script.c')
| -rw-r--r-- | tools/perf/builtin-script.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/tools/perf/builtin-script.c b/tools/perf/builtin-script.c index d079f36d342d..ac221f137ed2 100644 --- a/tools/perf/builtin-script.c +++ b/tools/perf/builtin-script.c | |||
| @@ -1681,13 +1681,8 @@ static void perf_sample__fprint_metric(struct perf_script *script, | |||
| 1681 | .force_header = false, | 1681 | .force_header = false, |
| 1682 | }; | 1682 | }; |
| 1683 | struct perf_evsel *ev2; | 1683 | struct perf_evsel *ev2; |
| 1684 | static bool init; | ||
| 1685 | u64 val; | 1684 | u64 val; |
| 1686 | 1685 | ||
| 1687 | if (!init) { | ||
| 1688 | perf_stat__init_shadow_stats(); | ||
| 1689 | init = true; | ||
| 1690 | } | ||
| 1691 | if (!evsel->stats) | 1686 | if (!evsel->stats) |
| 1692 | perf_evlist__alloc_stats(script->session->evlist, false); | 1687 | perf_evlist__alloc_stats(script->session->evlist, false); |
| 1693 | if (evsel_script(evsel->leader)->gnum++ == 0) | 1688 | if (evsel_script(evsel->leader)->gnum++ == 0) |
| @@ -1794,7 +1789,7 @@ static void process_event(struct perf_script *script, | |||
| 1794 | return; | 1789 | return; |
| 1795 | } | 1790 | } |
| 1796 | 1791 | ||
| 1797 | if (PRINT_FIELD(TRACE)) { | 1792 | if (PRINT_FIELD(TRACE) && sample->raw_data) { |
| 1798 | event_format__fprintf(evsel->tp_format, sample->cpu, | 1793 | event_format__fprintf(evsel->tp_format, sample->cpu, |
| 1799 | sample->raw_data, sample->raw_size, fp); | 1794 | sample->raw_data, sample->raw_size, fp); |
| 1800 | } | 1795 | } |
| @@ -2359,6 +2354,8 @@ static int __cmd_script(struct perf_script *script) | |||
| 2359 | 2354 | ||
| 2360 | signal(SIGINT, sig_handler); | 2355 | signal(SIGINT, sig_handler); |
| 2361 | 2356 | ||
| 2357 | perf_stat__init_shadow_stats(); | ||
| 2358 | |||
| 2362 | /* override event processing functions */ | 2359 | /* override event processing functions */ |
| 2363 | if (script->show_task_events) { | 2360 | if (script->show_task_events) { |
| 2364 | script->tool.comm = process_comm_event; | 2361 | script->tool.comm = process_comm_event; |
