Granulate / gprofiler

gProfiler is a system-wide profiler, combining multiple sampling profilers to produce unified visualization of what your CPU is spending time on.
https://profiler.granulate.io
Apache License 2.0
745 stars 54 forks source link

java: Add an option to collect full hs_err file #670

Closed Jongy closed 1 year ago

Jongy commented 1 year ago

In _check_hotspot_error we check, given a Java process, if it has an hs_err file. If we find one, we read only relevant data from it and log it. In some cases the full file is needed - I'd like it configurable with a flag --java-full-hserr which will replace these lines https://github.com/Granulate/gprofiler/blob/fded6bc0f333b386813928139a394c5c94178924/gprofiler/profilers/java.py#L1014-L1029 with just logging the full file: Found Hotspot error log for pid {pid} at {error_file}:\n{contents}.