diff options
author | Jin Yao <yao.jin@linux.intel.com> | 2019-08-28 08:59:29 +0300 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2019-09-01 04:27:51 +0300 |
commit | a55ab7c4ca6986a542d313b02043a39ebf712a39 (patch) | |
tree | 002bb1bd33ae84caffdfd38215157b16a3c61064 /tools/perf/util/pmu.h | |
parent | d3300a3c4e76ccecf4daa889327e340a870c550b (diff) | |
download | linux-a55ab7c4ca6986a542d313b02043a39ebf712a39.tar.xz |
perf pmu: Change convert_scale from static to global
The function convert_scale() can be used to convert string to unit and
scale. For example,
s = "6000000000ns";
convert_scale(s, &unit, &scale);
unit = "ns", scale = 6000000000.
Currently this function is static. This patch renames the function to
perf_pmu__convert_scale and changes the function to global. No
functional change.
Signed-off-by: Jin Yao <yao.jin@linux.intel.com>
Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com>
Cc: Andi Kleen <ak@linux.intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Kan Liang <kan.liang@linux.intel.com>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lore.kernel.org/lkml/20190828055932.8269-2-yao.jin@linux.intel.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/pmu.h')
-rw-r--r-- | tools/perf/util/pmu.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/perf/util/pmu.h b/tools/perf/util/pmu.h index 3f8b79b1dd85..f36ade6df76d 100644 --- a/tools/perf/util/pmu.h +++ b/tools/perf/util/pmu.h @@ -96,4 +96,6 @@ struct perf_event_attr *perf_pmu__get_default_config(struct perf_pmu *pmu); struct pmu_events_map *perf_pmu__find_map(struct perf_pmu *pmu); +int perf_pmu__convert_scale(const char *scale, char **end, double *sval); + #endif /* __PMU_H */ |