#222 JIT profiling with oprofile fails when PID is > 32768


When using the libjvmti_oprofile.so java agent library to profile a Java app, a <pid>.dump file is created that stores information about the JITed code. The opjitconv program is supposed to use that <pid>.dump file to create an ELF-like file named <pid>.jo, which is the binary file against which samples are attributed by opreport. But if the process ID is greater than the Linux default of 32768, opjitconv fails to create the <pid>.jo, so all samples are attributed to the java anon memory mappings, and there is no visibility to the java methods (symbols) that were JITed.

The find_anon_dir_match() function in opjitconv/opjitconv.c should create a larger char array for holding the match filter. The array should be large enough to hold the largest possible process ID, plus the rest of the match filter.


  • Mauricio Faria de Oliveira

    I was able to use opjitconv w/ PIDs greater than 5 digits w/ this fix.
    It works.

  • Maynard Johnson

    Maynard Johnson - 2012-09-24
    • status: open --> open-fixed
  • Maynard Johnson

    Maynard Johnson - 2012-09-24

    Thanks for testing the fix. I pushed the patch upstream.

  • Maynard Johnson

    Maynard Johnson - 2013-07-29
    • status: open-fixed --> closed-fixed
    • Group: -->

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

JavaScript is required for this form.

No, thanks