Skip to content

Commit

Permalink
fix mistake during rebase; tracer load doesnt start the profiler, the…
Browse files Browse the repository at this point in the history
… root object does
  • Loading branch information
armcknight committed Jan 4, 2024
1 parent c3404ec commit f3e920a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
2 changes: 1 addition & 1 deletion Sources/Sentry/Profiling/SentryProfilerState.mm
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ - (void)appendBacktrace:(const Backtrace &)backtrace
state.frameIndexLookup[instructionAddress] = newFrameIndex;
[state.frames addObject:frame];
} else {
// printf("Already recorded function name; recording frame index\n");
// printf("Already recorded function name; recording frame index\n");
[stack addObject:frameIndex];
}
}
Expand Down
8 changes: 4 additions & 4 deletions Sources/Sentry/SentryBacktrace.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ namespace profiling {
const std::shared_ptr<ThreadMetadataCache> &cache)
{
const auto pair = ThreadHandle::allExcludingCurrent();
// printf("%llu: gathering next sample of backtraces\n", getAbsoluteTime());
// printf("%llu: gathering next sample of backtraces\n", getAbsoluteTime());
for (const auto &thread : pair.first) {
Backtrace bt;
// This one is probably safe to call while the thread is suspended, but
Expand All @@ -116,9 +116,9 @@ namespace profiling {

// Log an empty stack for an idle thread, we don't need to walk the stack.
if (thread->isIdle()) {
// printf("%llu: thread %llu is idle, not walking stack\n",
// getAbsoluteTime(),
// thread->tid());
// printf("%llu: thread %llu is idle, not walking stack\n",
// getAbsoluteTime(),
// thread->tid());
bt.threadMetadata.threadID = thread->tid();
bt.threadMetadata.priority = -1;
f(bt);
Expand Down
5 changes: 0 additions & 5 deletions Sources/Sentry/SentryTracer.m
Original file line number Diff line number Diff line change
Expand Up @@ -203,11 +203,6 @@ + (void)startLaunchProfile
}
#endif // SENTRY_TARGET_PROFILING_SUPPORTED

+ (void)load
{
[self startLaunchProfile];
}

static NSObject *appStartMeasurementLock;
static BOOL appStartMeasurementRead;

Expand Down

0 comments on commit f3e920a

Please sign in to comment.