EngFlow / bazel_invocation_analyzer

A tool that automatically analyzes a Bazel build's profile and offers suggestions on how to make it faster.
https://analyzer.engflow.com
Apache License 2.0
90 stars 10 forks source link

Cannot find GC thread in newer profiles #110

Closed saraadams closed 11 months ago

saraadams commented 11 months ago

Description

For more current versions of the Bazel profile, the garbage collector thread is not found. The CLI prints out: This does not appear to be a valid Bazel profile. Unable to find garbage collector thread.

Observed behavior

The GC thread is not found.

Expected behavior

The GC thread is found.

Step-by-step guide on how to reproduce the bug

  1. Try to anayze a profile generated by a more recent Bazel version, e.g. I was able to reproduce this with 7.0.0.

Additional context

It seems the GC events are now in a thread named "Notification Thread". We could update the code to look for that thread - or ignore the thread name and simply look for entries that have the category gc notification. The latter might be better, as I have also seen valid Bazel profiles that include no GC / notification thread.

saraadams commented 11 months ago

Fixed by https://github.com/bazelbuild/bazel/pull/20299, added to 7.0 by https://github.com/bazelbuild/bazel/pull/20327