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

meta: remove leftover noisy logging #3738

Merged
merged 1 commit into from
Mar 14, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
12 changes: 1 addition & 11 deletions Sources/Sentry/Profiling/SentryProfilerState.mm
Original file line number Diff line number Diff line change
Expand Up @@ -115,26 +115,17 @@ - (void)appendBacktrace:(const Backtrace &)backtrace
# endif

const auto stack = [NSMutableArray<NSNumber *> array];
# if defined(DEBUG)
printf("[Sentry] [debug] [SentryProfilerState:%d] stack frames: %lu; stack thread: %s\n",
__LINE__, backtrace.addresses.size(), threadID.UTF8String);
# endif // defined(DEBUG)
for (std::vector<uintptr_t>::size_type backtraceAddressIdx = 0;
backtraceAddressIdx < backtrace.addresses.size(); backtraceAddressIdx++) {
const auto instructionAddress
= sentry_formatHexAddressUInt64(backtrace.addresses[backtraceAddressIdx]);

const auto frameIndex = state.frameIndexLookup[instructionAddress];
if (frameIndex == nil) {
const auto frame = [NSMutableDictionary<NSString *, id> dictionary];
frame[@"instruction_addr"] = instructionAddress;
# if defined(DEBUG)
const auto functionName
frame[@"function"]
= parseBacktraceSymbolsFunctionName(symbols[backtraceAddressIdx]);
printf("[Sentry] [debug] [SentryProfilerState:%d] function name: %s; instruction "
"address: %s\n",
__LINE__, functionName.UTF8String, instructionAddress.UTF8String);
frame[@"function"] = functionName;
# endif
const auto newFrameIndex = @(state.frames.count);
[stack addObject:newFrameIndex];
Expand All @@ -145,7 +136,6 @@ - (void)appendBacktrace:(const Backtrace &)backtrace
}
}
# if defined(DEBUG)
printf("-----finished backtrace-----\n");
free(symbols);
# endif

Expand Down