On bionic LGTM:

$ lsb_release  -a | fgrep Codename
Codename:       bionic
$ uname -a
Linux guest 4.15.0-53-generic #57-Ubuntu SMP Thu Jun 13 09:28:40 UTC 2019 
ppc64le ppc64le ppc64le GNU/Linux
$ java -version
openjdk version "11.0.3" 2019-04-16
OpenJDK Runtime Environment (build 11.0.3+7-Ubuntu-1ubuntu218.04.1)
OpenJDK 64-Bit Server VM (build 11.0.3+7-Ubuntu-1ubuntu218.04.1, mixed mode)

$ sudo apt-get install -y linux-tools-$(uname -r)/bionic-proposed

cat << EOF > hello.java
class hello {
  static void printX() {
    System.out.printf("X");
  }
        
  public static void main(String[] args) {
  int i;
  for (i=0; i < 64000; i++)
    printX();   
  }
}
EOF

$ javac hello.java
$ sudo perf record -k 1 -e instructions:u java 
-agentpath:/usr/lib/linux-tools-4.15.0-53/libperf-jvmti.so hello > /dev/null
java: jvmti: jitdump in 
/home/user/.debug/jit/java-jit-20190620.XXH3rSWT/jit-4232.dump
[ perf record: Woken up 1 times to write data ]
[ perf record: Captured and wrote 0.136 MB perf.data (3368 samples) ]
$ sudo perf inject -i ./perf.data -j -o ./perf.data.jitted
$ sudo perf report -f -i ./perf.data.jitted |& fgrep printX
     0.38%  java             jitted-4232-595.so  [.] class hello.printX()

-- 
You received this bug notification because you are a member of Kernel
Packages, which is subscribed to linux in Ubuntu.
https://bugs.launchpad.net/bugs/1761379

Title:
  [18.04/18.10] File libperf-jvmti.so is missing in linux-tools-common
  deb on Ubuntu

Status in The Ubuntu-power-systems project:
  Fix Committed
Status in linux package in Ubuntu:
  Fix Committed
Status in linux source package in Artful:
  Won't Fix
Status in linux source package in Bionic:
  Fix Committed
Status in linux source package in Cosmic:
  Fix Committed
Status in linux source package in Disco:
  Fix Committed

Bug description:
  [Impact]
  File libperf-jvmti.so is missing in linux-tools-common deb making it 
impossible to use perf for the JVM JITed methods.

  [Test case]
  $ sudo perf record -k 1 -e instructions:u ./java 
-agentpath:/usr/lib/linux-tools-5.0.0-8/libperf-jvmti.so crc32
  $ sudo perf inject -i ./perf.data -j -o ./perf.data.jitted
  $ sudo perf report -f -i ./perf.data.jitted

  [Fix]
  Include java build dependencies and install the library into linux-tools 
package.

  [Regression potential]
  Small regression potential, an extra file is distributed and is not 
automatically linked to anything. It could impact the build, which was tested.

  ---Problem Description---
  File libperf-jvmti.so is missing in linux-tools-common deb making it 
impossible to use perf for the JVM JITed methods

  ---uname output---
  linux-image-4.13.0-36-generic

  Machine Type = not relevant

  ---Debugger---
  A debugger is not configured

  ---Steps to Reproduce---
   File libperf-jvmti.so is missing in linux-tools-common deb provided for 
Ubuntu 17.10 making it impossible to use perf for the JVM JITed methods. I also 
checked if the file is available on launchpad 
(https://launchpad.net/ubuntu/+source/linux) for Bionic Beaver proposed (main) 
at it's also absent there:

  gromero@ltc-wspoon3:~/download$ dpkg -c 
linux-tools-common_4.15.0-13.14_all.deb | fgrep jvm
  gromero@ltc-wspoon3:~/download$ dpkg -c 
linux-tools-4.15.0-13-generic_4.15.0-13.14_ppc64el.deb | fgrep jvm

  I do see the file in tools/perf/jvmti dir in the source .tar.gz, but
  apparently it's no being packaged in any .deb file?

  Thanks.

  Userspace tool common name: perf

  The userspace tool has the following bit modes: 64-bit

  Userspace tool obtained from project website:  na

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu-power-systems/+bug/1761379/+subscriptions

-- 
Mailing list: https://launchpad.net/~kernel-packages
Post to     : kernel-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~kernel-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to