Profiling command line application does not work with AdoptOpenJDK 1.8.0_292-b10, showing the following output in the console:
Could not find compiler TLS offsets for VMThread. Unsupported JVM?
C detected
Using AdoptOpenJDK 11.0.11+9 does work.
By the way, I love the work you (Kirill) have done for the Windows port, and will be playing with this a lot.
It would be good to be aware of any limitations in the current version though, so as not to report irrelevant issues.
Attachments5
dlllibasyncProfiler_with_fix_for_java8
image1
setup_sdk_with_pdb
set-jdk-for-RC
whoa
Activity settings
Commented over 2 years ago
Another thing I wanted to check: is Windows 7 a supported platform?
I've encountered crashes within libasyncProfiler.dll
on my old Windows 7 laptop, while profiling on Java 11.
Updated over 2 years ago
Included in builds: 213.1862
Updated over 2 years ago
resolved date: 3 Aug 2021
State: Submitted → Fixed
Commented over 2 years ago
@Taras Tielkes Thanks for your report and sorry for such a long response, it takes some time to finally deliver the fix
The problem was related not to the windows version itself but to the target JVM version. Now, I believe, the problem is fixed and the updated agent libasyncProfiler
will arrive in 2021.2.1 bugfix update.
Commented over 2 years ago
@Taras Tielkes
Speaking about Windows 7 support, I attached the new version of the libasyncProfiler.dll
(with this problem related to java8 being fixed), could you please check if it works fine on your Windows 7 machine?
To do this you need to download the attached library and set up a new(!) profiler configuration with the library provided as an agent: .
If your java 11 (or java8) will still crash please attach crashdump (or at least crash text dump) and I will take a look.
dlllibasyncProfiler_with_fix_for_java8
image1
Updated over 2 years ago
resolved date: 3 Aug 2021
Included in builds: 213.1862
State: Fixed → Wait for Reply
Commented over 2 years ago
Hi @Kirill Timofeev, great to hear!
I am happy to (re)test on the Windows 7 machine, however, you've attached the dll with incorrect visibility :)
State: Wait for Reply → Submitted
Commented over 2 years ago
here-we-go-again.jpg
updated the dll visivility
State: Submitted → Wait for Reply
Commented over 2 years ago
On Windows 10, profiling using both Java 8 and Java 11 (both somewhat recent AdoptOpenJDK releases) works well with the attached library.
On Windows 7, when attempting to attach and profile on jdk-11.0.11+9 (with the attached library), I see the following console output repeated:
[WARN] Can't winApiTlsSetThread, error code: 0Profiling started
[WARN] Can't winApiTlsSetThread, error code: 0
[WARN] Can't winApiTlsSetThread, error code: 0
[WARN] Can't winApiTlsSetThread, error code: 0
[WARN] Can't winApiTlsSetThread, error code: 0
[WARN] Can't winApiTlsSetThread, error code: 0
[WARN] Can't winApiTlsSetThread, error code: 0
[WARN] Can't winApiTlsSetThread, error code: 0
[WARN] Can't winApiTlsSetThread, error code: 0
[WARN] Can't winApiTlsSetThread, error code: 0
…
[WARN] Can't winApiTlsSetThread, error code: 0
With Profiler error: Invalid file format: Empty chunk
as the end result.
This is a different application being profiled on the Windows 7 machine though.
I'll continue experimentation and will share results here.
State: Wait for Reply → Submitted
Commented over 2 years ago
Well, technically IntelliJ IDEA does not support Windows 7:
https://www.jetbrains.com/help/idea/installation-guide.html
Operating system
Microsoft Windows 8 or later
So, the question is, how urgent is Windows 7 support for async-profiler for you? Do you use Windows 7 for you day-to-day work?
Updated over 2 years ago
State: Submitted → Wait for Reply
Commented over 2 years ago
Hi @Kirill Timofeev, I would say it is not urgent at all, my main workstation and laptop are on Windows 10. I assume you (as in "JetBrains") have reliable statistics, on how many stragglers there are left using IDEA on Windows 7.
The old workstation and laptop (which are on Windows 7) I sometimes still use in some test scenarios of our product. Sometimes for testing it is nice to have old machines :)
I was also somewhat curious from a technical perspective, as the core Win32 process/thread APIs have not evolved that much since Windows 7 (at least as far as I am aware).
Given that the new dll works for me on Windows 10, please feel free to close this ticket.
State: Wait for Reply → Submitted
Commented over 2 years ago
One more question, btw: are you planning to do some work to resolve the native stack frames (using DIA or such)? At the moment IDEA only shows module(dll) name in the native stack frames in flame graph.
Commented over 2 years ago
I was also somewhat curious from a technical perspective, as the core Win32 process/thread APIs have not evolved that much since Windows 7 (at least as far as I am aware).
Yep, that was exactly my thoughts.
However, to be honest I use Win32 API in such an obsucre way, that basically anything can be broken on older Windows :)
One more question, btw: are you planning to do some work to resolve the native stack frames (using DIA or such)? At the moment IDEA only shows module(dll) name in the native stack frames in flame graph.
Yep, for sure. There are still some things to do: both on IDEA side and win-async-profiler side.
Actually, the current version of win-async-profiler can already resolve native symbols if corresponding pdb files are located just near the dll files (We are using libdia, that is bundled with win-async-profiler)
To have native stack resolved you could download openjdk-jdk11-windows-x86_64-server-release.zip
from https://builds.shipilev.net/openjdk-jdk11/, extract it somewhere, and setup as SDK:
Then you need your RC to use this sdk:
and finally, you could start the profiler:
Please note, that you could run almost any configuration on the provided JDK, event Gradle or Maven.
The tricky part is if there are no PDB files near the dlls and we need to do symbols lookup from async-profiler and downloading them from the IDEA side if the lookup failed.
I believe all these issues will be solved in the nearest future and the update will be available in some of the bug-fix updates for 2021.2.
Show more
setup_sdk_with_pdb
set-jdk-for-RC
whoa
2
Commented over 2 years ago
And thanks a lot for your feedback!
Updated over 2 years ago
resolved date: 3 Aug 2021
State: Submitted → Fixed
Commented over 2 years ago
Close this issue as fixed, windows 7 support for win-async-profiler is out of the scope of the future plans.
Commented over 2 years ago
I'm using this feature practically every day, so more feedback will come ;)
Commented over 2 years ago
@Kirill Timofeev I tried your steps above, using the JDK build from Aleksey Shipilëv, and the results make me very happy.
Are you planning to improve resolution for Windows modules in native stack frames as well?
Commented over 2 years ago
Are you planning to improve resolution for Windows modules in native stack frames as well?
Yep. Microsoft publishes Windows modules debug symbols on their public symbol server. We could download them easily, however, we surely do not want to do this from your JVM process that is being profiled. We will download them from IDEA process, store them in the specifc location, and after that our profiler will be able to resolve the symbols "in place" before saving the dump.
Commented over 2 years ago
Very good to hear, add an ability to visually classify stack frames (https://youtrack.jetbrains.com/issue/IDEA-272480#focus=Comments-27-4994849.0-0 / https://youtrack.jetbrains.com/issue/IDEA-223684), and we'll be "Profiling with pleasure"™
Commented over 2 years ago
@Kirill Timofeev The issue still exists in 2021.2.1 (Build #IU-212.5080.55, built on August 24, 2021) on Windows 10, OpenJDK 1.8.0_301
libasyncProfiler.dll that you attached to this ticket helped when used as instructed in one of the comments above.
Commented over 2 years ago
@Kirill Timofeev Is allocation profiling supported on Windows?
I tried setting the agent options to interval=1ms,event=cpu,alloc=1m
(using latest 2021.3 EAP build), but on startup of the process saw this output in the console:
[ERROR] AllocTracer is unsupported on Windows
Updated about 2 years ago
Available in: 2021.3 Beta
Commented about 2 years ago
@Kirill Timofeev I assume the resolving using symbol servers is scheduled for IDEA 2022.x? I saw relevant commits in the github repository, but did not see any UI to enable it.
Updated about 2 years ago
Available in: 2021.3 Beta → 2021.3
Commented about 2 years ago
Sorry, I still meet this issue on IDEA 2021.2.3(Build #IU0212.5757.46),Windows 10 and Oracle JDK 1.8.0_311-b11. How to solve this?
Commented about 2 years ago
@lity , could you please try the latest version 2021.3.1?
The fix should be available starting from 2021.3
Commented about 2 years ago
@Anna Ivanova oh,it's ok.Thanks
Updated about 1 year ago
Affected versions: 212.3116.43 → 2021.2 (212.4746.92)
原网址: 访问
创建于: 2024-02-23 15:53:57
目录: default
标签: 无
未标明原创文章均为采集,版权归作者所有,转载无需和我联系,请注明原出处,南摩阿彌陀佛,知识,不只知道,要得到
最新评论