chenBright commented on code in PR #3032: URL: https://github.com/apache/brpc/pull/3032#discussion_r2217157748
########## src/bthread/task_tracer.h: ########## @@ -87,12 +87,12 @@ class TaskTracer { // For signal trace. struct SignalSync : public butil::SharedObject { - explicit SignalSync(Result* result) : result(result) {} + explicit SignalSync() {} Review Comment: No need for SignalSync(). ########## src/bthread/task_tracer.cpp: ########## @@ -356,15 +356,14 @@ void TaskTracer::SignalHandler(int, siginfo_t* info, void* context) { // Ref has been taken before the signal is sent, so no need to add ref here. butil::intrusive_ptr<SignalSync> signal_sync( static_cast<SignalSync*>(info->si_value.sival_ptr), false); - if (NULL == signal_sync || NULL == signal_sync->result) { + if (NULL == signal_sync) { // The signal is not from Tracer, such as TaskControl, do nothing. return; } - Result* result = signal_sync->result; // Skip the first frame, which is the signal handler itself. - result->frame_count = absl::DefaultStackUnwinder(&result->ips[0], NULL, - arraysize(result->ips), - 1, context, NULL); + signal_sync->result.frame_count = absl::DefaultStackUnwinder(signal_sync->result.ips, NULL, + arraysize(signal_sync->result.ips), 1, + context, NULL); Review Comment: Format please. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscr...@brpc.apache.org For additional commands, e-mail: dev-h...@brpc.apache.org