Profile JVM on Raspberry Pi B+ 1.2
-
- Posts: 7
- Joined: Tue Dec 24, 2019 4:28 pm
Profile JVM on Raspberry Pi B+ 1.2
Hi,
I am trying to profile a Java application which is running on my Raspberry Pi B+ 1.2 headlessly. The profiler for linux-arm-x32 returns a segmentation error and does not work. I found out that this board has an ARM1176 processor which makes use of the ARMv6-processor architecture -- which seems not supported anymore by YourKit?
As a result, I could not find a libyjpagent.so-profiler for this architecture. Are there any (old) and (un)supported profilers available? Thanks!
I am trying to profile a Java application which is running on my Raspberry Pi B+ 1.2 headlessly. The profiler for linux-arm-x32 returns a segmentation error and does not work. I found out that this board has an ARM1176 processor which makes use of the ARMv6-processor architecture -- which seems not supported anymore by YourKit?
As a result, I could not find a libyjpagent.so-profiler for this architecture. Are there any (old) and (un)supported profilers available? Thanks!
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Profile JVM on Raspberry Pi B+ 1.2
Older profiler versions can be found at
https://www.yourkit.com/download/archive.jsp
Please use the agent from "bin/linux-armv5-sf" from version 2019.1, which is the last one supporting ARMv5.
You'll need to use v2019.1 UI with it.
https://www.yourkit.com/download/archive.jsp
Please use the agent from "bin/linux-armv5-sf" from version 2019.1, which is the last one supporting ARMv5.
You'll need to use v2019.1 UI with it.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Profile JVM on Raspberry Pi B+ 1.2
Hi,
Did the old version help?
Did the old version help?
-
- Posts: 7
- Joined: Tue Dec 24, 2019 4:28 pm
Re: Profile JVM on Raspberry Pi B+ 1.2
Hi Anton,
Thanks for your reply. Unfortunately not, I've received this error while the file *is* available at this location:
Should this agent work on an ARMv6 hard float processor architecture? That is used by the Raspberry Pi B+ 1.2 board.
Thanks for your reply. Unfortunately not, I've received this error while the file *is* available at this location:
Code: Select all
Could not find agent library /home/pi/yourkit/YourKit-JavaProfiler-2019.1/bin/linux-armv5-sf/libyjpagent.so in absolute path, with error: /home/pi/yourkit/YourKit-JavaProfiler-2019.1/bin/linux-armv5-sf/libyjpagent.so: cannot open shared object file: No such file or directory
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Profile JVM on Raspberry Pi B+ 1.2
Hi,
What does this command print?
ldd -r /home/pi/yourkit/YourKit-JavaProfiler-2019.1/bin/linux-armv5-sf/libyjpagent.so
As I understand, yes. This agent is compiled as soft-float ("sf" in the name), so it should work on hardware with hard float too. Also, it targets ARMv5, so should run on ARMv6 as well.Should this agent work on an ARMv6 hard float processor architecture?
What does this command print?
ldd -r /home/pi/yourkit/YourKit-JavaProfiler-2019.1/bin/linux-armv5-sf/libyjpagent.so
-
- Posts: 7
- Joined: Tue Dec 24, 2019 4:28 pm
Re: Profile JVM on Raspberry Pi B+ 1.2
The ldd command prints the following message:
Code: Select all
ldd -r /home/pi/yourkit/YourKit-JavaProfiler-2019.1/bin/linux-armv5-sf/libyjpagent.so
not a dynamic executable
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Profile JVM on Raspberry Pi B+ 1.2
What does it show for these?
file /home/pi/yourkit/YourKit-JavaProfiler-2019.1/bin/linux-armv5-sf/libyjpagent.so
uname -a
file /home/pi/yourkit/YourKit-JavaProfiler-2019.1/bin/linux-armv5-sf/libyjpagent.so
uname -a
-
- Posts: 7
- Joined: Tue Dec 24, 2019 4:28 pm
Re: Profile JVM on Raspberry Pi B+ 1.2
The response is;
Code: Select all
pi@Marantz:~ $ uname -a
Linux Marantz 4.19.66+ #1253 Thu Aug 15 11:37:30 BST 2019 armv6l GNU/Linux
-
- Posts: 7
- Joined: Tue Dec 24, 2019 4:28 pm
Re: Profile JVM on Raspberry Pi B+ 1.2
And;
Code: Select all
pi@Marantz:~ $ file /home/pi/yourkit/YourKit-JavaProfiler-2019.1/bin/linux-armv5-sf/libyjpagent.so
/home/pi/yourkit/YourKit-JavaProfiler-2019.1/bin/linux-armv5-sf/libyjpagent.so: ELF 32-bit LSB shared object, ARM, EABI5 version 1 (SYSV), dynamically linked, stripped
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Profile JVM on Raspberry Pi B+ 1.2
Did you try the hard float library from the same version 2019.1?
/home/pi/yourkit/YourKit-JavaProfiler-2019.1/bin/linux-armv7-hf/libyjpagent.so
Does it work with "ldd -r"?
Does Java load it?
Although it has "armv7" in its name, perhaps the compiler de-facto generated instructions for older architecture, and it will work for you. The chance is not big, though.
/home/pi/yourkit/YourKit-JavaProfiler-2019.1/bin/linux-armv7-hf/libyjpagent.so
Does it work with "ldd -r"?
Does Java load it?
Although it has "armv7" in its name, perhaps the compiler de-facto generated instructions for older architecture, and it will work for you. The chance is not big, though.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Profile JVM on Raspberry Pi B+ 1.2
Update:
Apparently the hard float agent linux-armv7-hf from v2019.1 won't work because it was compiled with GCC targeting whereas your board likely needs
Perhaps it makes sense to try even older profiler versions from the archive. For example, I see that v2016.02 was compiled with a much older compiler than v2019.1. Unfortunately, I cannot provide exact target detail for older versions because it's now extremely difficult to recreate the build environment which existed at the build time.
The best approach I can suggest is to actually try older versions in the archive, one-by-one, to check whether a compatible agent exists.
Apparently the hard float agent linux-armv7-hf from v2019.1 won't work because it was compiled with GCC targeting
Code: Select all
--with-arch=armv7-a --with-fpu=vfpv3-d16 --with-float=hard
Code: Select all
--with-arch=armv6 --with-fpu=vfp --with-float=hard
The best approach I can suggest is to actually try older versions in the archive, one-by-one, to check whether a compatible agent exists.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Profile JVM on Raspberry Pi B+ 1.2
FYI: the oldest version in the archive with ARM agent is v12.0.6.
-
- Posts: 7
- Joined: Tue Dec 24, 2019 4:28 pm
Re: Profile JVM on Raspberry Pi B+ 1.2
I've tried this version as well, which results in a fatal error:Did you try the hard float library from the same version 2019.1?
/home/pi/yourkit/YourKit-JavaProfiler-2019.1/bin/linux-armv7-hf/libyjpagent.so
Code: Select all
# A fatal error has been detected by the Java Runtime Environment:
#
# SIGILL (0x4) at pc=0xb60d7a74, pid=23195, tid=23196
Thanks for the complete update, I will try all the older versions and give an overview of my results here.FYI: the oldest version in the archive with ARM agent is v12.0.6.
-
- Posts: 7
- Joined: Tue Dec 24, 2019 4:28 pm
Re: Profile JVM on Raspberry Pi B+ 1.2
I tried every profiler, but unfortunately none of them work.
You can find the log files of every test I've did here: https://gist.github.com/tjibbevanderlaa ... ec39b99031
You can find the log files of every test I've did here: https://gist.github.com/tjibbevanderlaa ... ec39b99031
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Profile JVM on Raspberry Pi B+ 1.2
Apparently, YourKit Java Profiler ARM hard float agent has always been targeting armv7. Hence it's unfortunately impossible to profile Raspberry Pi B+ 1.2 in your configuration. Minimum requirement is Raspberry Pi 2.