Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1327722
| From | Arnaldo Carvalho de Melo <acme@kernel.org> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v8 2/4] perf inject: add jitdump mmap injection support |
| Date | 2016-02-05 15:00 +0100 |
| Message-ID | <qYP5x-Xo-35@gated-at.bofh.it> (permalink) |
| References | (3 earlier) <qTRrk-1iu-5@gated-at.bofh.it> <qYA6u-7KA-7@gated-at.bofh.it> <qYBcf-i9-57@gated-at.bofh.it> <qYOVQ-SY-17@gated-at.bofh.it> <qYP5x-Xo-27@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Em Fri, Feb 05, 2016 at 10:51:18AM -0300, Arnaldo Carvalho de Melo escreveu:
> Em Fri, Feb 05, 2016 at 10:47:31AM -0300, Arnaldo Carvalho de Melo escreveu:
> > Em Thu, Feb 04, 2016 at 03:02:59PM -0800, Stephane Eranian escreveu:
> > > > I'm keeping what I have a perf/jit branch in my git tree.
> >
> > What am I doing wrong? Continuing to investigate...
> > #7 0x00007fef53f31b3a in strlen () from /lib64/libc.so.6
> > #8 0x00007fef51e8e4c1 in compiled_method_load_cb (jvmti=0x7fef4c003ef0, method=<optimized out>, code_size=520, code_addr=0x7fef3d0ffd00, map_length=<optimized out>,
> > map=0x0, compile_info=0x7fef04019e80) at libjvmti.c:85
>
>
> Ok, this bandaid cured the segfault:
>
>
> -------------------------------------------------------------
> diff --git a/tools/perf/jvmti/libjvmti.c b/tools/perf/jvmti/libjvmti.c
> index 745f20c7b4bd..92ffbe4ff160 100644
> --- a/tools/perf/jvmti/libjvmti.c
> +++ b/tools/perf/jvmti/libjvmti.c
> @@ -82,7 +82,7 @@ compiled_method_load_cb(jvmtiEnv *jvmti,
> * append file name, we use loops and not string ops to avoid modifying
> * class_sign which is used later for the symbol name
> */
> - for (j = 0; i < (PATH_MAX - 1) && j < strlen(file_name); j++, i++)
> + for (j = 0; i < (PATH_MAX - 1) && file_name && j < strlen(file_name); j++, i++)
> fn[i] = file_name[j];
> fn[i] = '\0';
> } else {
> -------------------------------------------------------------
>
> Now:
>
> [acme@jouet java]$ java -agentpath:/home/acme/git/linux/tools/perf/jvmti/libjvmti.so hello.java
> java: jvmti: jitdump in /home/acme/.debug/jit/java-jit-20160205.XXdDr2Wr/jit-28322.dump
> Error: Could not find or load main class hello.java
> [acme@jouet java]$
>
> Do I need to set CLASSPATH or something? /me tries...
Duh:
[acme@jouet java]$ java -agentpath:/home/acme/git/linux/tools/perf/jvmti/libjvmti.so hello
java: jvmti: jitdump in /home/acme/.debug/jit/java-jit-20160205.XXFb472a/jit-28966.dump
Hello, World
[acme@jouet java]$
- Arnaldo
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: [PATCH v8 2/4] perf inject: add jitdump mmap injection support Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-04 23:00 +0100
Re: [PATCH v8 2/4] perf inject: add jitdump mmap injection support Stephane Eranian <eranian@google.com> - 2016-02-05 00:10 +0100
Re: [PATCH v8 2/4] perf inject: add jitdump mmap injection support Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-05 14:50 +0100
Re: [PATCH v8 2/4] perf inject: add jitdump mmap injection support Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-05 15:00 +0100
Re: [PATCH v8 2/4] perf inject: add jitdump mmap injection support Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-05 15:00 +0100
Re: [PATCH v8 2/4] perf inject: add jitdump mmap injection support Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-02-05 15:30 +0100
Re: [PATCH v8 2/4] perf inject: add jitdump mmap injection support Stephane Eranian <eranian@google.com> - 2016-02-08 20:00 +0100
csiph-web