Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[9.0.0] Don't copy callstacks in the CPU profiler#28034

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Open
bazel-io wants to merge1 commit intobazelbuild:release-9.0.0
base:release-9.0.0
Choose a base branch
Loading
frombazel-io:cp28021-9.0.0

Conversation

@bazel-io
Copy link
Member

The CpuProfiler doesn't retain the call stack and it's method is invoked synchronously, so there is no need for a copy.

Closes#28021.

PiperOrigin-RevId: 845694649
Change-Id: I825b3020467129e8dd20ac63c6ca0d6a8ca22cab

Commitc0f2078

The CpuProfiler doesn't retain the call stack and it's method is invoked synchronously, so there is no need for a copy.Closesbazelbuild#28021.PiperOrigin-RevId: 845694649Change-Id: I825b3020467129e8dd20ac63c6ca0d6a8ca22cab
@bazel-iobazel-io requested a review froma team as acode ownerDecember 17, 2025 11:51
@bazel-iobazel-io added the awaiting-reviewPR is awaiting review from an assigned reviewer labelDec 17, 2025
@bazel-iobazel-io requested a review fromtjgqDecember 17, 2025 11:51
Copy link

@gemini-code-assistgemini-code-assistbot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a performance optimization in the CPU profiler by avoiding an unnecessary copy of the call stack when recording a profile event. The change modifiesCpuProfiler.addEvent andPprofWriter.writeEvent to accept aList<? extends Debug.Frame> instead of anImmutableList<Debug.Frame>, allowing theStarlarkThread's internalcallstack to be passed directly without creating a defensive copy. This is safe because the call stack is processed synchronously within a synchronized method, preventing concurrent modification issues. The changes are correct and should improve the efficiency of CPU profiling.

Sign up for freeto join this conversation on GitHub. Already have an account?Sign in to comment

Reviewers

@tjgqtjgqAwaiting requested review from tjgq

1 more reviewer

@gemini-code-assistgemini-code-assist[bot]gemini-code-assist[bot] left review comments

Reviewers whose approvals may not affect merge requirements

At least 1 approving review is required to merge this pull request.

Assignees

No one assigned

Labels

awaiting-reviewPR is awaiting review from an assigned reviewer

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@bazel-io@fmeum

[8]ページ先頭

©2009-2025 Movatter.jp