{"push_id":972033609,"size":30,"distinct_size":1,"ref":"refs/heads/perf/bugfix-config-manviewer","head":"4afe563bda7eaacab454386d48e0affb28736694","before":"a507e93d9f41abe5f66b6e4d65a4f099ac51a3ea","commits":[{"sha":"16aaa53756501914a863ae7a15fcb070dc27c3d7","author":{"email":"48f2f67c39d147af96a1b165969cb1e75a797c0a@intel.com","name":"Huaitong Han"},"message":"x86/cpufeature: Use enum cpuid_leafs instead of magic numbers\n\nMost of the magic numbers in x86_capability[] have been converted to\n'enum cpuid_leafs', and this patch updates the remaining part.\n\nSigned-off-by: Huaitong Han <huaitong.han@intel.com>\nSigned-off-by: Borislav Petkov <bp@suse.de>\nCc: Alexander Kuleshov <kuleshovmail@gmail.com>\nCc: Andrew Morton <akpm@linux-foundation.org>\nCc: Andy Lutomirski <luto@kernel.org>\nCc: Boris Ostrovsky <boris.ostrovsky@oracle.com>\nCc: Borislav Petkov <bp@alien8.de>\nCc: Brian Gerst <brgerst@gmail.com>\nCc: David Vrabel <david.vrabel@citrix.com>\nCc: Denys Vlasenko <dvlasenk@redhat.com>\nCc: H. Peter Anvin <hpa@zytor.com>\nCc: Hector Marco-Gisbert <hecmargi@upv.es>\nCc: Jiang Liu <jiang.liu@linux.intel.com>\nCc: Kees Cook <keescook@chromium.org>\nCc: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>\nCc: Linus Torvalds <torvalds@linux-foundation.org>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Rusty Russell <rusty@rustcorp.com.au>\nCc: Thomas Gleixner <tglx@linutronix.de>\nCc: Tony Luck <tony.luck@intel.com>\nCc: Viresh Kumar <viresh.kumar@linaro.org>\nCc: lguest@lists.ozlabs.org\nCc: xen-devel@lists.xenproject.org\nLink: http://lkml.kernel.org/r/1453750913-4781-3-git-send-email-bp@alien8.de\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/16aaa53756501914a863ae7a15fcb070dc27c3d7"},{"sha":"1b74dde7c47c19a73ea3e9fac95ac27b5d3d50c5","author":{"email":"f8f3efe79b21471c61542c9e508e0b85db02cfb1@gmail.com","name":"Chen Yucong"},"message":"x86/cpu: Convert printk(KERN_<LEVEL> ...) to pr_<level>(...)\n\n - Use the more current logging style pr_<level>(...) instead of the old\n   printk(KERN_<LEVEL> ...).\n\n - Convert pr_warning() to pr_warn().\n\nSigned-off-by: Chen Yucong <slaoub@gmail.com>\nCc: Borislav Petkov <bp@alien8.de>\nCc: H. Peter Anvin <hpa@zytor.com>\nCc: Linus Torvalds <torvalds@linux-foundation.org>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Thomas Gleixner <tglx@linutronix.de>\nLink: http://lkml.kernel.org/r/1454384702-21707-1-git-send-email-slaoub@gmail.com\nSigned-off-by: Ingo Molnar <mingo@kernel.org>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/1b74dde7c47c19a73ea3e9fac95ac27b5d3d50c5"},{"sha":"5978531b296ab7e61abef43f2a1a2d9b92246de1","author":{"email":"293abb6b76d7791c0732cc517d38c4b5c734b87f@redhat.com","name":"Arnaldo Carvalho de Melo"},"message":"perf build tests: Elide \"-f Makefile\" from make invokation\n\nSince this is the name that 'make' will look for if no explicit -f file\nis passed.\n\nThis in turn makes the output of 'build-test' more compact:\n\nBefore:\n\n  $ perf stat make -C tools/perf build-test\n  <SNIP>\n  cd . && make FEATURE_DUMP_COPY=/home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP feature-dump\n          make_no_libaudit_O: cd . && make -f Makefile  O=/tmp/tmp.tHIa0Kkk2Y DESTDIR=/tmp/tmp.foK7rckkVi NO_LIBAUDIT=1 FEATURES_DUMP=/home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP\n  <SNIP>\n\nAfter:\n\n  $ perf stat make -C tools/perf build-test\n  <SNIP>\n          make_no_libaudit_O: cd . && make  O=/tmp/tmp.tHIa0Kkk2Y DESTDIR=/tmp/tmp.foK7rckkVi NO_LIBAUDIT=1 FEATURES_DUMP=/home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP\n  <SNIP>\n\nCc: Adrian Hunter <adrian.hunter@intel.com>\nCc: David Ahern <dsahern@gmail.com>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Wang Nan <wangnan0@huawei.com>\nLink: http://lkml.kernel.org/n/tip-m440lb8dkfsywsyah0htif6t@git.kernel.org\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/5978531b296ab7e61abef43f2a1a2d9b92246de1"},{"sha":"3c7a152b0d1c81b9bac5ab922dc57168046668bf","author":{"email":"293abb6b76d7791c0732cc517d38c4b5c734b87f@redhat.com","name":"Arnaldo Carvalho de Melo"},"message":"perf build tests: Move the feature related vars to the front of the make cmdline\n\nSo that we do less visual searching on the 'make build-test' output to\nsee the feature related variables:\n\nAfter:\n\n  $ make -C tools/perf build-test\n  <SNIP>\n           make_no_newt_O: cd . && make NO_NEWT=1 FEATURES_DUMP=/home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP O=/tmp/tmp.dz55IX DESTDIR=/tmp/tmp.X29xxo\n              make_tags_O: cd . && make tags FEATURES_DUMP=/home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP O=/tmp/tmp.6ecLh8 DESTDIR=/tmp/tmp.6vIla578Ho\n  make_util_pmu_bison_o_O: cd . && make util/pmu-bison.o FEATURES_DUMP=/home/acme/git/linux/tools/perf/BUILD_TEST_FEATURE_DUMP O=/tmp/tmp.SVPM2G DESTDIR=/tmp/tmp.C0oAam\n\nCc: Adrian Hunter <adrian.hunter@intel.com>\nCc: David Ahern <dsahern@gmail.com>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Wang Nan <wangnan0@huawei.com>\nLink: http://lkml.kernel.org/n/tip-dx4krgzqa566v1pedrbrcchi@git.kernel.org\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/3c7a152b0d1c81b9bac5ab922dc57168046668bf"},{"sha":"67f43c009778ddaae812aae29731bb04c256165e","author":{"email":"e48a91ea2cc0d190fe633dc63dba6b65916caf95@gmail.com","name":"Taeung Song"},"message":"perf config: Document 'ui.show-headers' variable in man page\n\nThis option controls display of column headers (like 'Overhead' and\n'Symbol') in 'report' and 'top'. If this option is false, they are\nhidden.  This option is only applied to TUI.\n\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>\nCc: Jiri Olsa <jolsa@kernel.org>\nCc: Namhyung Kim <namhyung@kernel.org>\nLink: http://lkml.kernel.org/r/1454577913-16401-2-git-send-email-treeze.taeung@gmail.com\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/67f43c009778ddaae812aae29731bb04c256165e"},{"sha":"56c94dc56f9e4c1c09fbe26ad65715caa2259438","author":{"email":"e48a91ea2cc0d190fe633dc63dba6b65916caf95@gmail.com","name":"Taeung Song"},"message":"perf config: Document variables for 'call-graph' section in man page\n\nExplain 'call-graph' section and its variables:\n\n  'record-mode', 'dump-size', 'print-type', 'order', 'sort-key',\n  'threshold' and 'print-limit'.\n\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>\nCc: Jiri Olsa <jolsa@kernel.org>\nCc: Namhyung Kim <namhyung@kernel.org>\nLink: http://lkml.kernel.org/r/1454577913-16401-3-git-send-email-treeze.taeung@gmail.com\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/56c94dc56f9e4c1c09fbe26ad65715caa2259438"},{"sha":"806cb95bb6cb25105b37d971d9916105898cb6fe","author":{"email":"e48a91ea2cc0d190fe633dc63dba6b65916caf95@gmail.com","name":"Taeung Song"},"message":"perf config: Document variables for 'report' section in man page\n\nExplain 'report' section's variables:\n\n  'percent-limit', 'queue-size' and 'children'.\n\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>\nCc: Jiri Olsa <jolsa@kernel.org>\nCc: Namhyung Kim <namhyung@kernel.org>\nLink: http://lkml.kernel.org/r/1454577913-16401-4-git-send-email-treeze.taeung@gmail.com\n[ Fix some grammar issues, add some more info ]\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/806cb95bb6cb25105b37d971d9916105898cb6fe"},{"sha":"0b04c84087d3188c648628a6c73738314724c921","author":{"email":"e48a91ea2cc0d190fe633dc63dba6b65916caf95@gmail.com","name":"Taeung Song"},"message":"perf config: Document 'top.children' variable in man page\n\nExplain 'top.children' variable.\n\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>\nCc: Jiri Olsa <jolsa@kernel.org>\nCc: Namhyung Kim <namhyung@kernel.org>\nLink: http://lkml.kernel.org/r/1454577913-16401-5-git-send-email-treeze.taeung@gmail.com\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/0b04c84087d3188c648628a6c73738314724c921"},{"sha":"08b75b409e3799553a3536e628f1dba4c87d7c14","author":{"email":"e48a91ea2cc0d190fe633dc63dba6b65916caf95@gmail.com","name":"Taeung Song"},"message":"perf config: Document 'man.viewer' variable in man page\n\nExplain 'man.viewer' variable and how to add new man viewer tools.\n\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>\nCc: Jiri Olsa <jolsa@kernel.org>\nCc: Namhyung Kim <namhyung@kernel.org>\nLink: http://lkml.kernel.org/r/1454577913-16401-6-git-send-email-treeze.taeung@gmail.com\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/08b75b409e3799553a3536e628f1dba4c87d7c14"},{"sha":"ab2e08e8ba683f3e923a56b1e81b5c5e115bad0b","author":{"email":"e48a91ea2cc0d190fe633dc63dba6b65916caf95@gmail.com","name":"Taeung Song"},"message":"perf config: Document 'pager.<subcommand>' variables in man page\n\nExplain 'pager.<subcommand>' variables.\n\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>\nCc: Jiri Olsa <jolsa@kernel.org>\nCc: Namhyung Kim <namhyung@kernel.org>\nLink: http://lkml.kernel.org/r/1454577913-16401-7-git-send-email-treeze.taeung@gmail.com\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/ab2e08e8ba683f3e923a56b1e81b5c5e115bad0b"},{"sha":"57f0dafe6a41de6c9d81bc6c403349a261e10fc4","author":{"email":"e48a91ea2cc0d190fe633dc63dba6b65916caf95@gmail.com","name":"Taeung Song"},"message":"perf config: Document 'kmem.default' variable in man page\n\nExplain 'kmem.default' variable.\n\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>\nCc: Jiri Olsa <jolsa@kernel.org>\nCc: Namhyung Kim <namhyung@kernel.org>\nLink: http://lkml.kernel.org/r/1454577913-16401-8-git-send-email-treeze.taeung@gmail.com\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/57f0dafe6a41de6c9d81bc6c403349a261e10fc4"},{"sha":"a9edec3ce211d776736b35b14b9bd2c0b5ed860b","author":{"email":"e48a91ea2cc0d190fe633dc63dba6b65916caf95@gmail.com","name":"Taeung Song"},"message":"perf config: Document 'record.build-id' variable in man page\n\nExplain 'record.build-id' variable.\n\nSigned-off-by: Taeung Song <treeze.taeung@gmail.com>\nCc: Jiri Olsa <jolsa@kernel.org>\nCc: Namhyung Kim <namhyung@kernel.org>\nLink: http://lkml.kernel.org/r/1454577913-16401-9-git-send-email-treeze.taeung@gmail.com\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/a9edec3ce211d776736b35b14b9bd2c0b5ed860b"},{"sha":"3e2751d9169563486c2bfe7382726f1315cb156b","author":{"email":"2c6594f608aa3d41e98d48846a6328831f7084ad@redhat.com","name":"Jiri Olsa"},"message":"perf tools: Fix parallel build including 'clean' target\n\nDo not parallelize 'clean' with other targets, figure out if it is\npresent and do it first, then the other targets.\n\nNoticed with:\n\n  tools/perf> make -j24 clean all\n\n   LD       arch/libperf-in.o\n   LD       plugin_xen-in.o\n arch//libperf-in.o: file not recognized: File truncated\n make[3]: *** [arch/libperf-in.o] Error 1\n make[2]: *** [arch] Error 2\n make[2]: *** Waiting for unfinished jobs....\n   AR       libapi.a\n\nReported-and-Tested-by: Arnaldo Carvalho de Melo <acme@redhat.com>\nSigned-off-by: Jiri Olsa <jolsa@redhat.com>\nAcked-by: Wang Nan <wangnan0@huawei.com>\nLink: http://lkml.kernel.org/n/tip-kb0qs29zbz7hxn32mc5zbsoz@git.kernel.org\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/3e2751d9169563486c2bfe7382726f1315cb156b"},{"sha":"be9e49911123516ef883836906269832aec37e01","author":{"email":"293abb6b76d7791c0732cc517d38c4b5c734b87f@redhat.com","name":"Arnaldo Carvalho de Melo"},"message":"perf build tests: Do parallell builds with 'build-test'\n\nCc: Adrian Hunter <adrian.hunter@intel.com>\nCc: David Ahern <dsahern@gmail.com>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Wang Nan <wangnan0@huawei.com>\nLink: http://lkml.kernel.org/n/tip-jhmnf9g7y9ryqcjql00unk5y@git.kernel.org\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/be9e49911123516ef883836906269832aec37e01"},{"sha":"89fee59b504f86925894fcc9ba79d5c933842f93","author":{"email":"bc4bbf83189bf2aa3b4ae434673d425054bbfadd@gmail.com","name":"Marcin Ślusarz"},"message":"perf tools: handle spaces in file names obtained from /proc/pid/maps\n\nSteam frequently puts game binaries in folders with spaces.\n\nNote: \"(deleted)\" markers are now treated as part of the file name.\n\nSigned-off-by: Marcin Ślusarz <marcin.slusarz@gmail.com>\nAcked-by: Namhyung Kim <namhyung@kernel.org>\nFixes: 6064803313ba (\"perf tools: Use sscanf for parsing /proc/pid/maps\")\nLink: http://lkml.kernel.org/r/20160119190303.GA17579@marcin-Inspiron-7720\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/89fee59b504f86925894fcc9ba79d5c933842f93"},{"sha":"e9c4bcdd349eb00f6c704450a063b3dcbea25864","author":{"email":"f199ae9781930a5b94b284ca2f471140752002a7@google.com","name":"Stephane Eranian"},"message":"perf symbols: add Java demangling support\n\nAdd Java function descriptor demangling support.  Something bfd cannot\ndo.\n\nUse the JAVA_DEMANGLE_NORET flag to avoid decoding the return type of\nfunctions.\n\nSigned-off-by: Stephane Eranian <eranian@google.com>\nCc: Adrian Hunter <adrian.hunter@intel.com>\nCc: Andi Kleen <ak@linux.intel.com>\nCc: Carl Love <cel@us.ibm.com>\nCc: David Ahern <dsahern@gmail.com>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: John McCutchan <johnmccutchan@google.com>\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Pawel Moll <pawel.moll@arm.com>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Sonny Rao <sonnyrao@chromium.org>\nCc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>\nLink: http://lkml.kernel.org/r/1448874143-7269-2-git-send-email-eranian@google.com\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/e9c4bcdd349eb00f6c704450a063b3dcbea25864"},{"sha":"8ee4646038e47d065d35703e3e343136c4cd42aa","author":{"email":"f199ae9781930a5b94b284ca2f471140752002a7@google.com","name":"Stephane Eranian"},"message":"perf build: Add libcrypto feature detection\n\nWill be used to generate build-ids in the jitdump code.\n\nSigned-off-by: Stephane Eranian <eranian@google.com>\nCc: Adrian Hunter <adrian.hunter@intel.com>\nCc: Andi Kleen <ak@linux.intel.com>\nCc: Carl Love <cel@us.ibm.com>\nCc: David Ahern <dsahern@gmail.com>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: John McCutchan <johnmccutchan@google.com>\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Pawel Moll <pawel.moll@arm.com>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Sonny Rao <sonnyrao@chromium.org>\nCc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>\nLink: http://lkml.kernel.org/r/1448874143-7269-3-git-send-email-eranian@google.com\n[ tools/perf/Makefile.perf comment about NO_LIBCRYPTO and added it to tests/make ]\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/8ee4646038e47d065d35703e3e343136c4cd42aa"},{"sha":"921f3fadbc48c7c3799b415b895297cd476cf7f1","author":{"email":"293abb6b76d7791c0732cc517d38c4b5c734b87f@redhat.com","name":"Arnaldo Carvalho de Melo"},"message":"perf inject: Make sure mmap records are ordered when injecting build_ids\n\nTo make sure the mmap records are ordered correctly and so that the\ncorrect especially due to jitted code mmaps.\n\nWe cannot generate the buildid hit list and inject the jit mmaps (will\ncome right after this patch) in at the same time for now.\n\nSigned-off-by: Stephane Eranian <eranian@google.com>\nCc: Adrian Hunter <adrian.hunter@intel.com>\nCc: Andi Kleen <ak@linux.intel.com>\nCc: Carl Love <cel@us.ibm.com>\nCc: David Ahern <dsahern@gmail.com>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: John McCutchan <johnmccutchan@google.com>\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Pawel Moll <pawel.moll@arm.com>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Sonny Rao <sonnyrao@chromium.org>\nCc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>\nLink: http://lkml.kernel.org/r/1448874143-7269-3-git-send-email-eranian@google.com\n[ Carved out from a larger patch ]\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/921f3fadbc48c7c3799b415b895297cd476cf7f1"},{"sha":"9b07e27f88b9cd785cdb23f9a2231c12521dda94","author":{"email":"f199ae9781930a5b94b284ca2f471140752002a7@google.com","name":"Stephane Eranian"},"message":"perf inject: Add jitdump mmap injection support\n\nThis patch adds a --jit/-j option to perf inject.\n\nThis options injects MMAP records into the perf.data file to cover the\njitted code mmaps. It also emits ELF images for each function in the\njidump file.  Those images are created where the jitdump file is.  The\nMMAP records point to that location as well.\n\nTypical flow:\n\n  $ perf record -k mono -- java -agentpath:libpjvmti.so java_class\n  $ perf inject --jit -i perf.data -o perf.data.jitted\n  $ perf report -i perf.data.jitted\n\nNote that jitdump.h support is not limited to Java, it works with any\njitted environment modified to emit the jitdump file format, include\nthose where code can be jitted multiple times and moved around.\n\nThe jitdump.h format is adapted from the Oprofile project.\n\nThe genelf.c (ELF binary generation) depends on MD5 hash encoding for\nthe buildid. To enable this, libssl-dev must be installed. If not, then\ngenelf.c defaults to using urandom to generate the buildid, which is not\nideal.  The Makefile auto-detects the presence on libssl-dev.\n\nThis version mmaps the jitdump file to create a marker MMAP record in\nthe perf.data file. The marker is used to detect jitdump and cause perf\ninject to inject the jitted mmaps and generate ELF images for jitted\nfunctions.\n\nIn V8, the following fixes and changes were made among other things:\n\n  -  the jidump header format include a new flags field to be used\n     to carry information about the configuration of the runtime agent.\n     Contributed by: Adrian Hunter <adrian.hunter@intel.com>\n\n  - Fix mmap pgoff: MMAP event pgoff must be the offset within the ELF file\n    at which the code resides.\n    Contributed by: Adrian Hunter <adrian.hunter@intel.com>\n\n  - Fix ELF virtual addresses: perf tools expect the ELF virtual addresses of dynamic\n    objects to match the file offset.\n    Contributed by: Adrian Hunter <adrian.hunter@intel.com>\n\n  - JIT MMAP injection does not obey finished_round semantics. JIT MMAP injection injects all\n    MMAP events in one go, so it does not obey finished_round semantics, so drop the\n    finished_round events from the output perf.data file.\n    Contributed by: Adrian Hunter <adrian.hunter@intel.com>\n\nSigned-off-by: Stephane Eranian <eranian@google.com>\nCc: Adrian Hunter <adrian.hunter@intel.com>\nCc: Andi Kleen <ak@linux.intel.com>\nCc: Carl Love <cel@us.ibm.com>\nCc: David Ahern <dsahern@gmail.com>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: John McCutchan <johnmccutchan@google.com>\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Pawel Moll <pawel.moll@arm.com>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Sonny Rao <sonnyrao@chromium.org>\nCc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>\nLink: http://lkml.kernel.org/r/1448874143-7269-3-git-send-email-eranian@google.com\n[ Moved inject.build_ids ordering bits to a separate patch, fixed the NO_LIBELF=1 build ]\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/9b07e27f88b9cd785cdb23f9a2231c12521dda94"},{"sha":"209045adc2bbdb2b315fa5539cec54d01cd3e7db","author":{"email":"f199ae9781930a5b94b284ca2f471140752002a7@google.com","name":"Stephane Eranian"},"message":"perf tools: add JVMTI agent library\n\nThis is a standalone JVMTI library to help  profile Java jitted code with perf\nrecord/perf report. The library is not installed or compiled automatically by\nperf Makefile. It is not used directly by perf. It is arch agnostic and has\nbeen tested on X86 and ARM. It needs to be used with a Java runtime, such as\nOpenJDK, as follows:\n\n  $ java -agentpath:libjvmti.so .......\n\nSee the \"Committer Notes\" below on how to build it.\n\nWhen used this way, java will generate a jitdump binary file in\n$HOME/.debug/java/jit/java-jit-*\n\nThis binary dump file contains information to help symbolize and\nannotate jitted code.\n\nThe jitdump information must be injected into the perf.data file\nusing:\n\n  $ perf inject --jit -i perf.data -o perf.data.jitted\n\nThis injects the MMAP records to cover the jitted code and also generates\none ELF image for each jitted function. The ELF images are created in the\nsame subdir as the jitdump file. The MMAP records point there too.\n\nThen, to visualize the function or asm profile, simply use the regular\nperf commands:\n\n  $ perf report -i perf.data.jitted\n\nor\n\n  $ perf annotate -i perf.data.jitted\n\nJVMTI agent code adapted from the OProfile's opagent code.\n\nThis version of the JVMTI agent is using the CLOCK_MONOTONIC as the time\nsource to timestamp jit samples. To correlate with perf_events samples,\nit needs to run on kernel 4.0.0-rc5+ or later with the following commit\nfrom Peter Zijlstra:\n\n  34f439278cef (\"perf: Add per event clockid support\")\n\nWith this patch recording jitted code is done as follows:\n\n   $ perf record -k mono -- java -agentpath:libjvmti.so .......\n\n --------------------------------------------------------------------------\n\nCommitter Notes:\n\nExtended testing instructions:\n\n  $ cd tools/perf/jvmti/\n  $ dnf install java-devel\n  $ make\n\nThen, create some simple java stuff to record some samples:\n\n  $ cat hello.java\n  public class hello {\n\tpublic static void main(String[] args) {\n                 System.out.println(\"Hello, World\");\n       \t}\n  }\n  $ javac hello.java\n  $ java hello\n  Hello, World\n  $\n\nAnd then record it using this jvmti thing:\n\n  $ perf record -k mono java -agentpath:/home/acme/git/linux/tools/perf/jvmti/libjvmti.so hello\n  java: jvmti: jitdump in /home/acme/.debug/jit/java-jit-20160205.XXWIEDls/jit-1908.dump\n  Hello, World\n  [ perf record: Woken up 1 times to write data ]\n  [ perf record: Captured and wrote 0.030 MB perf.data (268 samples) ]\n  $\n\nNow lets insert the PERF_RECORD_MMAP2 records to point jitted mmaps to\nfiles created by the agent:\n\n  $ perf inject --jit -i perf.data -o perf.data.jitted\n\nAnd finally see that it did its job:\n\n  $ perf report -D -i perf.data.jitted | grep PERF_RECORD_MMAP2 | tail -5\n  79197149129422 0xfe10 [0xa0]: PERF_RECORD_MMAP2 1908/1923: [0x7f172428bd60(0x80) @ 0x40 fd:02 1840554 1]: --xs /home/acme/.debug/jit/java-jit-20160205.XXWIEDls/jitted-1908-283.so\n  79197149235701 0xfeb0 [0xa0]: PERF_RECORD_MMAP2 1908/1923: [0x7f172428ba60(0x180) @ 0x40 fd:02 1840555 1]: --xs /home/acme/.debug/jit/java-jit-20160205.XXWIEDls/jitted-1908-284.so\n  79197149250558 0xff50 [0xa0]: PERF_RECORD_MMAP2 1908/1923: [0x7f172428b860(0x180) @ 0x40 fd:02 1840556 1]: --xs /home/acme/.debug/jit/java-jit-20160205.XXWIEDls/jitted-1908-285.so\n  79197149714746 0xfff0 [0xa0]: PERF_RECORD_MMAP2 1908/1923: [0x7f172428b660(0x180) @ 0x40 fd:02 1840557 1]: --xs /home/acme/.debug/jit/java-jit-20160205.XXWIEDls/jitted-1908-286.so\n  79197149806558 0x10090 [0xa0]: PERF_RECORD_MMAP2 1908/1923: [0x7f172428b460(0x180) @ 0x40 fd:02 1840558 1]: --xs /home/acme/.debug/jit/java-jit-20160205.XXWIEDls/jitted-1908-287.so\n  $\n\nSo:\n\n  $ perf report -D -i perf.data | grep PERF_RECORD_MMAP2 | wc -l\n  Failed to open /tmp/perf-1908.map, continuing without symbols\n  21\n  $ perf report -D -i perf.data.jitted | grep PERF_RECORD_MMAP2 | wc -l\n  307\n  $ echo $((307 - 21))\n  286\n  $\n\n286 extra PERF_RECORD_MMAP2 records.\n\nAll for thise tiny, with just one function, ELF files:\n\n  $ file /home/acme/.debug/jit/java-jit-20160205.XXWIEDls/jitted-1908-9.so\n  /home/acme/.debug/jit/java-jit-20160205.XXWIEDls/jitted-1908-9.so: ELF 64-bit LSB shared object, x86-64, version 1 (SYSV), corrupted program header size, BuildID[sha1]=ae54a2ebc3ecf0ba547bfc8cabdea1519df5203f, not stripped\n  $ readelf -sw /home/acme/.debug/jit/java-jit-20160205.XXWIEDls/jitted-1908-9.so\n\n  Symbol table '.symtab' contains 2 entries:\n   Num:    Value          Size Type    Bind   Vis      Ndx Name\n     0: 0000000000000000     0 NOTYPE  LOCAL  DEFAULT  UND\n     1: 0000000000000040     9 FUNC    LOCAL  DEFAULT    1 atomic_cmpxchg_long\n  $\n\nInserted into the build-id cache:\n\n  $ ls -la ~/.debug/.build-id/ae/54a2ebc3ecf0ba547bfc8cabdea1519df5203f\n  lrwxrwxrwx. 1 acme acme 111 Feb  5 11:30 /home/acme/.debug/.build-id/ae/54a2ebc3ecf0ba547bfc8cabdea1519df5203f -> ../../home/acme/.debug/jit/java-jit-20160205.XXWIEDls/jitted-1908-9.so/ae54a2ebc3ecf0ba547bfc8cabdea1519df5203f\n\nNote: check why 'file' reports that 'corrupted program header size'.\n\nWith a stupid java hog to do some profiling:\n\n$ cat hog.java\n  public class hog {\n\tprivate static double do_something_else(int i) {\n\t\tdouble total = 0;\n\t\twhile (i > 0) {\n\t\t\ttotal += Math.log(i--);\n\t\t}\n\t\treturn total;\n\t}\n\tprivate static double do_something(int i) {\n\t\tdouble total = 0;\n\t\twhile (i > 0) {\n\t\t\ttotal += Math.sqrt(i--) + do_something_else(i / 100);\n\t\t}\n\t\treturn total;\n\t}\n\tpublic static void main(String[] args) {\n\t\tSystem.out.println(String.format(\"%s=%f & %f\", args[0],\n\t\t\t\t   do_something(Integer.parseInt(args[0])),\n\t\t\t\t   do_something_else(Integer.parseInt(args[1]))));\n\t}\n  }\n  $ javac hog.java\n  $ perf record -F 10000 -g -k mono java -agentpath:/home/acme/git/linux/tools/perf/jvmti/libjvmti.so hog 100000 2345000\n  java: jvmti: jitdump in /home/acme/.debug/jit/java-jit-20160205.XX4sqd14/jit-8670.dump\n  100000=291561592.669602 & 32050989.778714\n  [ perf record: Woken up 6 times to write data ]\n  [ perf record: Captured and wrote 1.536 MB perf.data (12538 samples) ]\n  $ perf inject --jit -i perf.data -o perf.data.jitted\n\nLooking at the 'perf report' TUI, at one expanded callchain leading\nto the jitted code:\n\n  $ perf report --no-children -i perf.data.jitted\n\nSamples: 12K of event 'cycles:pp', Event count (approx.): 3829569932\n  Overhead  Comm  Shared Object       Symbol\n-   93.38%  java  jitted-8670-291.so  [.] class hog.do_something_else(int)\n     class hog.do_something_else(int)\n   - Interpreter\n      - 75.86% call_stub\n           JavaCalls::call_helper\n           jni_invoke_static\n           jni_CallStaticVoidMethod\n           JavaMain\n           start_thread\n      - 17.52% JavaCalls::call_helper\n           jni_invoke_static\n           jni_CallStaticVoidMethod\n           JavaMain\n           start_thread\n\nSigned-off-by: Stephane Eranian <eranian@google.com>\nTested-by: Arnaldo Carvalho de Melo <acme@redhat.com>\nCc: Adrian Hunter <adrian.hunter@intel.com>\nCc: Andi Kleen <ak@linux.intel.com>\nCc: Carl Love <cel@us.ibm.com>\nCc: David Ahern <dsahern@gmail.com>\nCc: Jiri Olsa <jolsa@redhat.com>\nCc: John McCutchan <johnmccutchan@google.com>\nCc: Namhyung Kim <namhyung@kernel.org>\nCc: Pawel Moll <pawel.moll@arm.com>\nCc: Peter Zijlstra <peterz@infradead.org>\nCc: Sonny Rao <sonnyrao@chromium.org>\nCc: Sukadev Bhattiprolu <sukadev@linux.vnet.ibm.com>\nLink: http://lkml.kernel.org/r/1448874143-7269-4-git-send-email-eranian@google.com\n[ Made it build on fedora23, added some build/usage instructions ]\n[ Check if filename != NULL in compiled_method_load_cb, fixing segfault ]\nSigned-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>","distinct":false,"url":"https://api.github.com/repos/Taeung/linux-perf/commits/209045adc2bbdb2b315fa5539cec54d01cd3e7db"}]}