Skip to content

Commit

Permalink
copy global data structures in a synchronized context
Browse files Browse the repository at this point in the history
  • Loading branch information
armcknight committed May 10, 2023
1 parent 104d534 commit 3557f57
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Sources/Sentry/SentryProfiler.mm
Original file line number Diff line number Diff line change
Expand Up @@ -279,10 +279,10 @@
{
std::lock_guard<std::mutex> d(_gDataStructureLock);
samplesCopy = [profileData[@"profile"][@"samples"] copy];
stacksCopy = profileData[@"profile"][@"stacks"];
framesCopy = profileData[@"profile"][@"frames"];
threadMetadataCopy = profileData[@"profile"][@"thread_metadata"];
queueMetadataCopy = profileData[@"profile"][@"queue_metadata"];
stacksCopy = [profileData[@"profile"][@"stacks"] copy];
framesCopy = [profileData[@"profile"][@"frames"] copy];
threadMetadataCopy = [profileData[@"profile"][@"thread_metadata"] copy];
queueMetadataCopy = [profileData[@"profile"][@"queue_metadata"] copy];
}

// We need at least two samples to be able to draw a stack frame for any given function: one
Expand Down

0 comments on commit 3557f57

Please sign in to comment.