Re: [PATCH v4 3/4] perf inject: add jitdump mmap injection support

2015-03-26 Thread Adrian Hunter
> +static int > +jit_open(struct jit_buf_desc *jd, const char *name) > +{ > + struct jitheader header; > + struct jr_prefix *prefix; > + ssize_t bs, bsz = 0; > + void *n, *buf = NULL; > + int ret, retval = -1; > + > + jd->in = fopen(name, "r"); > + if (!jd->in) > +

Re: [PATCH v4 3/4] perf inject: add jitdump mmap injection support

2015-03-25 Thread David Ahern
On 3/25/15 2:41 PM, Carl E. Love wrote: I do not fine the directory tools/build in the linux kernel tree. I am wondering if the Build file and the tools/build directory might be part of your source tree build environment? you want to use acme's perf/core branch from git://git.kernel.org/pub/sc

Re: [PATCH v4 3/4] perf inject: add jitdump mmap injection support

2015-03-25 Thread Carl E. Love
On Tue, 2015-03-24 at 23:25 +0100, Stephane Eranian wrote: > linkperf:perf-record[1], linkperf:perf-report[1], > linkperf:perf-archive[1] > diff --git a/tools/perf/builtin-inject.c b/tools/perf/builtin-inject.c > index ea46df25..af25d1a 100644 > --- a/tools/perf/builtin-inject.c > +++ b/tools/perf

Re: [PATCH v4 3/4] perf inject: add jitdump mmap injection support

2015-03-25 Thread Carl E. Love
On Tue, 2015-03-24 at 23:25 +0100, Stephane Eranian wrote: > tools/build/Makefile.feature | 2 + > tools/build/feature/Makefile | 4 + > tools/build/feature/test-libcrypto.c | 9 + > tools/perf/Documentation/perf-inject.txt | 6 + > tools/perf/builtin-inject.c

[PATCH v4 3/4] perf inject: add jitdump mmap injection support

2015-03-24 Thread Stephane Eranian
This patch adds a --jit option to perf inject. This options injects MMAP records into the perf.data file to cover the jitted code mmaps. It also emits ELF images for each function in the jidump file. Those images are created where the jitdump file is. The MMAP records point to that location as wel