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
756 stars 55 forks source link

gProfiler on Alpine #636

Closed Jongy closed 1 year ago

Jongy commented 1 year ago

Historically we didn't support Alpine. I can find references here:

Nowadays running on gProfiler, the first problem I get is our grep usage isn't compatible with busybox grep:

[2022-12-16 23:29:14,807] DEBUG: gprofiler.utils: (["grep -lP '^.+/libjvm\\.so' /proc/*/maps"]) exit code: 2
[2022-12-16 23:29:14,807] ERROR: gprofiler.utils: Unexpected 'grep' error output (first 10 lines): [b'grep: unrecognized option: P', b'BusyBox v1.35.0 (2022-08-01 15:14:44 UTC) multi-call binary.', b'', b'Usage: grep [-HhnlLoqvsrRiwFE] [-m N] [-A|B|C N] { PATTERN | -e PATTERN... | -f FILE... } [FILE]...', b'', b'Search for PATTERN in FILEs (or stdin)', b'', b"\t-H\tAdd 'filename:' prefix", b"\t-h\tDo not add 'filename:' prefix", b"\t-n\tAdd 'line_no:' prefix"]
[2022-12-16 23:29:14,808] DEBUG: gprofiler.profilers.profiler_base: JavaProfiler: selected 0 processes to profile

That's the first thing to fix then, and after that we can enable the container test on Alpine, and remove the note from the README :) The error I mentioned on jattach shouldn't be relevant anymore, since we build it statically.

Goal is to be able to uncomment alpine from the tested containers, and have tests pass on Alpine :)