aboutsummaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2017-04-26tools lib string: Adopt prefixcmp() from perf and subcmdArnaldo Carvalho de Melo7-20/+13
Both had copies originating from git.git, move those to tools/lib/string.c, getting both tools/lib/subcmd/ and tools/perf/ to use it. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: David Ahern <dsahern@gmail.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Josh Poimboeuf <jpoimboe@redhat.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Wang Nan <wangnan0@huawei.com> Link: http://lkml.kernel.org/n/tip-uidwtticro1qhttzd2rkrkg1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-26perf units: Move parse_tag_value() to units.[ch]Arnaldo Carvalho de Melo4-34/+36
Its basically to do units handling, so move to a more appropriately named object. 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-90ob9vfepui24l8l2makhd9u@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-26perf ui gtk: Move gtk .so name to the only place where it is usedArnaldo Carvalho de Melo2-2/+3
No need to pollute util.h with this. Cc: Jiri Olsa <jolsa@kernel.org> Cc: Namhyung Kim <namhyung@kernel.org> Link: http://lkml.kernel.org/n/tip-kec0chbdtgrd71o3oi2kz2zt@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-26perf tools: Move HAS_BOOL define to where perl headers are usedArnaldo Carvalho de Melo2-2/+3
This is a perl specific hack, so move it from util.h to where perl headers are used. 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-4igctbinuom2sr6g4b03jqht@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-25perf memswap: Split the byteswap memory range wrappers from util.[ch]Arnaldo Carvalho de Melo8-25/+35
Just one more step into splitting util.[ch] to reduce the includes hell. 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-navarr9mijkgwgbzu464dwam@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-25perf tools: Move event prototypes from util.h to event.hArnaldo Carvalho de Melo11-9/+17
More needs to be done to have the actual functions and variables in a smaller .c file that can then be included in the python binding, avoiding dragging more stuff into it. Link: http://lkml.kernel.org/n/tip-uecxz7cqkssouj7tlxrkqpl4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-25perf buildid: Move prototypes from util.h to build-id.hArnaldo Carvalho de Melo3-4/+4
Where they belong. Link: http://lkml.kernel.org/n/tip-94m3dziejxgo7k0488q3mqjm@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24Merge tag 'perf-core-for-mingo-4.12-20170424' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/coreIngo Molnar229-733/+1328
Pull perf/core improvements and fixes from Arnaldo Carvalho de Melo: User visible changes: - Fix display of data source snoop indication in 'perf mem' (Andi Kleen) - Fix the code to strip command name from /proc/PID/stat (Jiri Olsa) Infrastructure changes: - Continue the disentanglement of headers, specially util.h (Arnaldo Carvalho de Melo) - Synchronize some header files with the kernel (Arnaldo Carvalho de Melo) Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com> Signed-off-by: Ingo Molnar <mingo@kernel.org>
2017-04-24perf tools: Fix the code to strip command nameJiri Olsa1-1/+8
Recent commit broke command name strip in perf_event__get_comm_ids function. It replaced left to right search for '\n' with rtrim, which actually does right to left search. It occasionally caught earlier '\n' and kept trash in the command name. Keeping the ltrim, but moving back the left to right '\n' search instead of the rtrim. Signed-off-by: Jiri Olsa <jolsa@kernel.org> Acked-by: Taeung Song <treeze.taeung@gmail.com> Cc: David Ahern <dsahern@gmail.com> Cc: Namhyung Kim <namhyung@kernel.org> Cc: Peter Zijlstra <a.p.zijlstra@chello.nl> Cc: Yao Jin <yao.jin@linux.intel.com> Fixes: bdd97ca63faa ("perf tools: Refactor the code to strip command name with {l,r}trim()") Link: http://lkml.kernel.org/r/20170420092430.29657-1-jolsa@kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24tools arch x86: Sync cpufeatures.hArnaldo Carvalho de Melo1-0/+1
To catch changes made in: 90218ac77d05 ("x86/cpufeature: Detect CPUID faulting support") No changes needed in the tools using this file at this time. Cc: Kyle Huey <me@kylehuey.com> Cc: Thomas Gleixner <tglx@linutronix.de> Link: http://lkml.kernel.org/n/tip-qiqsj5qg2ljbsbfre2zaf9v4@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24tools arch: Sync arch/x86/lib/memcpy_64.S with the kernelArnaldo Carvalho de Melo1-1/+1
Just a minor fix done in: Fixes: 26a37ab319a2 ("x86/mce: Fix copy/paste error in exception table entries") Cc: Tony Luck <tony.luck@intel.com> Link: http://lkml.kernel.org/n/tip-ni9jzdd5yxlail6pq8cuexw2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24tools: Update asm-generic/mman-common.h copy from the kernelArnaldo Carvalho de Melo1-2/+3
To get the changes in the commit Fixes: 3209f68b3ca4 ("statx: Include a mask for stx_attributes in struct statx") Silencing this perf build warning: Warning: tools/include/uapi/linux/stat.h differs from kernel No need to change the statx syscall beautifiers in 'perf trace' at this time. Cc: Adrian Hunter <adrian.hunter@intel.com> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: David Ahern <dsahern@gmail.com> Cc: David Howells <dhowells@redhat.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-y8bgiyzuvura62lffvh1zbg9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf tools: Use just forward declarations for struct thread where possibleArnaldo Carvalho de Melo15-5/+19
Removing various instances of unnecessary includes, reducing the maze of header dependencies. Link: http://lkml.kernel.org/n/tip-hwu6eyuok9pc57alookyzmsf@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf tools: Add the right header to obtain PERF_ALIGN()Arnaldo Carvalho de Melo1-1/+1
The util/event.h header needs PERF_ALIGN(), but wasn't including linux/kernel.h, where it is defined, instead it was getting it by luck by including map.h, which it doesn't need at all. Fix it by including the right header. Link: http://lkml.kernel.org/n/tip-nf3t9blzm5ncoxsczi8oy9mx@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf tools: Remove poll.h and wait.h from util.hArnaldo Carvalho de Melo12-2/+12
Not needed in this header, added to the places that need poll(), wait() and a few other prototypes. Link: http://lkml.kernel.org/n/tip-i39c7b6xmo1vwd9wxp6fmkl0@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf tools: Remove string.h, unistd.h and sys/stat.h from util.hArnaldo Carvalho de Melo25-4/+57
Not needed in this header, added to the places that need FILE, putchar(), access() and a few other prototypes. Link: http://lkml.kernel.org/n/tip-xxtdsl6nsna82j7puwbdjqhs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf tools: Remove stale prototypes from builtin.hArnaldo Carvalho de Melo2-5/+1
Some, like prune_packed_objects() are clearly git specific, others don't have implementations and some are used in just one place, make them static. Link: http://lkml.kernel.org/n/tip-faj3c5dnttf3hurv4pujut8n@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf tools: Remove string.h from util.hArnaldo Carvalho de Melo4-1/+4
Not needed in this header, added to the places that need strdup, strcmp and a few other prototypes. Link: http://lkml.kernel.org/n/tip-t24yy85xnlv55kyosrum2ubs@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf tools: Remove sys/ioctl.h from util.hArnaldo Carvalho de Melo5-2/+4
Not needed in this header, added to the places that need 'struct winsize' and the ioctl defines. Link: http://lkml.kernel.org/n/tip-2pznlli3146y4242otlcm70m@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf tools: Remove a few more needless includes from util.hArnaldo Carvalho de Melo1-4/+0
Link: http://lkml.kernel.org/n/tip-sb2zu21d6h42e5qnsrtl6wuu@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf tools: Include sys/param.h where neededArnaldo Carvalho de Melo9-1/+8
As it is going away from util.h, where it is not needed. This is mostly for things like MAXPATHLEN, MAX() and MIN(), these later two probably should go away in favor of its kernel sources replacements. Link: http://lkml.kernel.org/n/tip-z1666f3fl3fqobxvjr5o2r39@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf callchain: Move callchain specific routines from util.[ch]Arnaldo Carvalho de Melo4-108/+116
Where they belong, no point in leaving those in the generic "util" files. Link: http://lkml.kernel.org/n/tip-ljx3iiip1hlfa7a7apjem7ph@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf tools: Add compress.h for the *_decompress_to_file() headersArnaldo Carvalho de Melo5-8/+15
Out of util.h, the implementations were already in separate files, that are built conditionally. Link: http://lkml.kernel.org/n/tip-0ur7szxsb59f8758kfe63prb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf mem: Fix display of data source snoop indicationAndi Kleen1-1/+1
'perf mem report' doesn't display the data source snoop indication correctly. In the kernel API the definition is: #define PERF_MEM_SNOOP_NONE 0x02 /* no snoop */ #define PERF_MEM_SNOOP_HIT 0x04 /* snoop hit */ #define PERF_MEM_SNOOP_MISS 0x08 /* snoop miss */ but the table used by the perf tools exchanged "Hit" and "Miss": "None", "Miss", "Hit", Fix the table in perf. Signed-off-by: Andi Kleen <ak@linux.intel.com> Cc: Jiri Olsa <jolsa@kernel.org> Cc: Stephane Eranian <eranian@google.com> Link: http://lkml.kernel.org/r/20170419174940.13641-1-andi@firstfloor.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf debug: Move dump_stack() and sighandler_dump_stack() to debug.hArnaldo Carvalho de Melo4-35/+34
Two more out of util.h. Link: http://lkml.kernel.org/n/tip-polkuxm1cpr06lbgue5pyqum@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-24perf kvm: Make function only used by 'perf kvm' staticArnaldo Carvalho de Melo3-15/+14
No need to have this polluting util.h, it was polluted enough already. Link: http://lkml.kernel.org/n/tip-wfdidqlwbvi5y0s61kv6z2gn@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-20perf tools: Move timestamp routines from util.h to time-utils.hArnaldo Carvalho de Melo7-31/+35
We already have a header for time utilities, so use it. Link: http://lkml.kernel.org/n/tip-sijzpbvutlg0c3oxn49hy9ca@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-20perf tools: Move units conversion/formatting routines to separate objectArnaldo Carvalho de Melo11-39/+56
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>
2017-04-20perf tools: Add signal.h to places using its definitionsArnaldo Carvalho de Melo17-1/+16
And remove it from util.h, disentangling it a bit more. Link: http://lkml.kernel.org/n/tip-2zg9s5nx90yde64j3g4z2uhk@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-20perf unwind: Provide only forward declarations for pointer typesArnaldo Carvalho de Melo1-3/+6
No need to drag the headers, helps in untangling them and reducing build time. Link: http://lkml.kernel.org/n/tip-l8soqph92duyw5jdha0fij8b@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-20Merge tag 'perf-core-for-mingo-4.12-20170419' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/coreIngo Molnar180-376/+659
Pull perf/core cleanups from Arnaldo Carvalho de Melo: - Introduce new header files out of the hodge-podge that util/util.h became, trying to disentangle the includes hell that all C projects end up growing. This should help in build times, as changes to seemingly unrelated files (util.h included tons of headers) won't trigger a rebuild of most object files. - Use equivalent facilities found in the kernel source code base originated tools/include/ header files, such as __stringify(), ARRAY_SIZE, that has extra checks (__must_be_array()), etc. - For that get some more files from the kernel sources, like include/linux/bug.h, some just with the bits needed at this time. - Use the headers where facilities declared in them are used, such as PRIxu(32,64) macros (inttypes.h), errno defines (errno.h), etc. - Remove various leftovers from the initial code base we copied from git.git: FLEX_ARRAY, etc. Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-20Merge branch 'WIP.x86/process' into perf/coreIngo Molnar22-88/+258
2017-04-19perf tools: Ditch unused strchrnul() reimplementationArnaldo Carvalho de Melo1-16/+0
Remnants from the git codebase. 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-kwaez3uxo1w9f8v5r7etl0w6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Remove regex.h and fnmatch.h from util.hArnaldo Carvalho de Melo5-3/+4
The users of regex and fnmatch functions should include those headers instead. 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-ixzm5kuamsq1ixbkuv6kmwzj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Remove include dirent.h from util.hArnaldo Carvalho de Melo11-1/+11
The files using the dirent.h routines should instead include it, reducing the includes hell that lead to longer build times. 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-42g2f4z6nfg7mdb2ae97n7tj@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Remove misplaced __maybe_unused in some functionsArnaldo Carvalho de Melo1-2/+2
Those args _are_ being used. Link: http://lkml.kernel.org/n/tip-yi9s00ki1i1tcc704v042957@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Use api/fs/tracing_path.h where neededArnaldo Carvalho de Melo3-1/+2
Instead of getting it out of luck from util.h, where it isn't needed at all. 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-0bqugg5lc5ksla1v4m0dnmc1@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: No need to include bitops.h in util.hArnaldo Carvalho de Melo1-1/+0
When we switched to the kernel's roundup_pow_of_two we forgot to remove this include from util.h, do it now. 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> Fixes: 91529834d1de ("perf evlist: Use roundup_pow_of_two") Link: http://lkml.kernel.org/n/tip-kfye5rxivib6155cltx0bw4h@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Move path related functions to util/path.hArnaldo Carvalho de Melo15-28/+52
Disentangling util.h header mess 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-aj6je8ly377i4upedmjzdsq6@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Don't include terminal handling headers in util.hArnaldo Carvalho de Melo8-6/+12
Continuing the disentanglement, mostly the TUI needs CTRL(c), that is in sys/ttydefaults.h and term.c needs the termios headers. And term.h needs to be added to a few places too. 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-il19zna7qj9ytavdbwlipc7t@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf str{filter,list}: Disentangle headersArnaldo Carvalho de Melo17-11/+22
There are places where we just need a forward declaration, and others were we need to include strlist.h and/or strfilter.h, reducing the impact of changes in headers on the build time, do it. 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-zab42gbiki88y9k0csorxekb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Include errno.h where neededArnaldo Carvalho de Melo95-2/+96
Removing it from util.h, part of an effort to disentangle the includes hell, that makes changes to util.h or something included by it to cause a complete rebuild of the tools. 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-ztrjy52q1rqcchuy3rubfgt2@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Move extra string util functions to util/string2.hArnaldo Carvalho de Melo23-41/+72
Moving them from util.h, where they don't belong. Since libc already have string.h, name it slightly differently, as string2.h. 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-eh3vz5sqxsrdd8lodoro4jrw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Move srcline definitions to separate headerArnaldo Carvalho de Melo8-27/+40
Out of util.h into a new file, srcline.h 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-ludnlm4djqcdjziekzr4s3u9@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Move print_binary definitions to separate filesArnaldo Carvalho de Melo12-78/+91
Continuing the split of util.[ch] into more manageable bits. 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-5eu367rwcwnvvn7fz09l7xpb@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19tools include: Include missing headers for fls() and types in linux/log2.hArnaldo Carvalho de Melo1-0/+3
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-7wj865zidu5ylf87i6i7v6z7@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Move sane ctype stuff from util.h to sane_ctype.hArnaldo Carvalho de Melo37-55/+114
More stuff that came from git, out of the hodge-podge that is util.h 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-e3lana4gctz3ub4hn4y29hkw@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Ditch unused PATH_SEP, STRIP_EXTENSIONArnaldo Carvalho de Melo2-26/+0
Should make sense for windows, where git is supported. 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-lzxlhmqrizk72d0zcsreggy8@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Replace STR() calls with __stringify()Arnaldo Carvalho de Melo6-11/+12
Both do the same thing, the later is the one we get from linux/stringify.h, i.e. we now use the same function name/practice as the kernel sources. 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-w2sxa5o4bfx7fjrd5mu4zmke@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
2017-04-19perf tools: Remove PRI[xu] macros from perf.hArnaldo Carvalho de Melo1-20/+0
We get them from inttypes.h. 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-qla4e4mwbf1oewafp1ee2etd@git.kernel.org Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>