diff options
author | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-19 21:05:56 +0200 |
---|---|---|
committer | Arnaldo Carvalho de Melo <acme@redhat.com> | 2017-04-20 18:22:44 +0200 |
commit | 58db1d6e7d5d24afa2d32e916fd6f6b6d240ba93 (patch) | |
tree | 06771be58f7f44c42579561029bb811747a9678f /tools/perf/util/units.h | |
parent | perf tools: Add signal.h to places using its definitions (diff) | |
download | linux-58db1d6e7d5d24afa2d32e916fd6f6b6d240ba93.tar.xz linux-58db1d6e7d5d24afa2d32e916fd6f6b6d240ba93.zip |
perf tools: Move units conversion/formatting routines to separate object
Out of util.h, to disentangle it a bit more.
Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: David Ahern <dsahern@gmail.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Wang Nan <wangnan0@huawei.com>
Link: http://lkml.kernel.org/n/tip-vpksyj3w5fk9t8s6mxmkajyr@git.kernel.org
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
Diffstat (limited to 'tools/perf/util/units.h')
-rw-r--r-- | tools/perf/util/units.h | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/tools/perf/util/units.h b/tools/perf/util/units.h new file mode 100644 index 000000000000..3ed7774afaa9 --- /dev/null +++ b/tools/perf/util/units.h @@ -0,0 +1,10 @@ +#ifndef PERF_UNIT_H +#define PERF_UNIT_H + +#include <stddef.h> +#include <linux/types.h> + +unsigned long convert_unit(unsigned long value, char *unit); +int unit_number__scnprintf(char *buf, size_t size, u64 n); + +#endif /* PERF_UNIT_H */ |