Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BazelProfile] Support reading action count of Bazel profiles generated with Bazel 7 #115

Closed
wants to merge 2 commits into from

Conversation

saraadams
Copy link
Collaborator

With Bazel 7, the action count events are no longer part of the Main Thread, as they no longer include a tid.
This PR changes the logic, so that the action count can be retrieved both for older styleand newer style profiles.

Contributes to #113.

The functionality provided by `BazelProfile` may need to take the Bazel version
into consideration. Therefore, this PR makes the version available within and through
the `BazelProfile`, while `BazelVersionDataProvider` stays in place to provide easier
access, as well as memoization.

Contributes to #109.

Signed-off-by: Sara Adams <[email protected]>
…ed with Bazel 7

With Bazel 7, the action count events are no longer part of the `Main Thread`, as they
no longer include a `tid`.
This PR changes the logic, so that the action count can be retrieved both for older style
and newer style profiles.

Contributes to #113.

Signed-off-by: Sara Adams <[email protected]>
@saraadams
Copy link
Collaborator Author

Highlighted in bazelbuild/bazel#18548 (comment)
I plan to work on a patch to reintroduce the tid tomorrow, which would greatly simplify this PR. Some of the changes might still be beneficial, though.
Converting to draft for now.

@saraadams
Copy link
Collaborator Author

If bazelbuild/bazel#20300 is accepted, the tid should again be present.

@saraadams
Copy link
Collaborator Author

(I also verified that for Bazel 6.4.0 the tid is still present.)

Base automatically changed from sara-move-bazelversion-logic to main November 24, 2023 18:24
this.processId = processId;
this.threadId = threadId;
}

public int getThreadId() {
public Integer getThreadId() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this be marked @Nullable?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not planning to merge this PR (hence I converted it to a draft), given that the issue is hopefully resolved on the Bazel side (ensuring profiles do have tid for action count entries) - see bazelbuild/bazel#20300.

@saraadams
Copy link
Collaborator Author

Closing, as bazelbuild/bazel#20300 was merged and gets rid of the regression.

@saraadams saraadams closed this Nov 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants