Chromium Code Reviews| Index: src/base/debug/stack_trace_posix.cc |
| diff --git a/src/base/debug/stack_trace_posix.cc b/src/base/debug/stack_trace_posix.cc |
| index cbd722d35cda9e12a33898c912f4da4794148599..c4bccc81c81d02f63d080f48f1231ee145318443 100644 |
| --- a/src/base/debug/stack_trace_posix.cc |
| +++ b/src/base/debug/stack_trace_posix.cc |
| @@ -145,6 +145,9 @@ void ProcessBacktrace(void* const* trace, size_t size, |
| bool printed = false; |
| +// NOTE: backtrace_symbol API is not supported on AIX and there is no |
| +// equivalent user-mode API. For now disabling the call to the API |
|
rmcilroy
2016/09/08 10:10:10
No need for the comment (there are probably other
|
| +#if !V8_OS_AIX |
|
rmcilroy
2016/09/08 10:10:10
Could you instead ifdef out the whole of ProcessBa
|
| // Below part is async-signal unsafe (uses malloc), so execute it only |
| // when we are not executing the signal handler. |
| if (in_signal_handler == 0) { |
| @@ -162,6 +165,7 @@ void ProcessBacktrace(void* const* trace, size_t size, |
| printed = true; |
| } |
| } |
| +#endif |
| if (!printed) { |
| for (size_t i = 0; i < size; ++i) { |
| @@ -356,12 +360,18 @@ void DisableSignalStackDump() { |
| } |
| StackTrace::StackTrace() { |
| +// NOTE: backtrace API is not supported on AIX and there is no |
| +// equivalent user-mode API. For now disabling the call to the API |
|
rmcilroy
2016/09/08 10:10:10
No need for the comment
|
| +#if V8_OS_AIX |
|
rmcilroy
2016/09/08 10:10:10
Could you make this #if !V8_OS_AIX and swap the br
|
| + count_ = 0; |
| +#else |
| // NOTE: This code MUST be async-signal safe (it's used by in-process |
| // stack dumping signal handler). NO malloc or stdio is allowed here. |
| // Though the backtrace API man page does not list any possible negative |
| // return values, we take no chance. |
| count_ = static_cast<size_t>(backtrace(trace_, arraysize(trace_))); |
| +#endif |
| } |
| void StackTrace::Print() const { |