Skip to content

Commit

Permalink
[7.2.0] Support profiling in an virtual thread. (#22375)
Browse files Browse the repository at this point in the history
Cherry-pick commits:
- 1077721
- 10e02a1
  • Loading branch information
coeuvre authored May 15, 2024
1 parent a98d588 commit 084478b
Show file tree
Hide file tree
Showing 3 changed files with 168 additions and 157 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,9 @@ public void start() {
}

public void enqueue(TraceData data) {
if (!metadataPosted.get()) {
// We assign a virtual lane for virtual thread and the metadata for the virtual lane is posted
// at creation time.
if (!Thread.currentThread().isVirtual() && !metadataPosted.get()) {
metadataPosted.set(Boolean.TRUE);
queue.add(new ThreadMetadata());
}
Expand Down
Loading

0 comments on commit 084478b

Please sign in to comment.