proxygen
|
#include <Symbolizer.h>
Public Member Functions | |
FastStackTracePrinter (std::unique_ptr< SymbolizePrinter > printer, size_t elfCacheSize=0, size_t symbolCacheSize=kDefaultSymbolCacheSize) | |
~FastStackTracePrinter () | |
FOLLY_NOINLINE void | printStackTrace (bool symbolize) |
void | flush () |
Static Public Attributes | |
static constexpr size_t | kDefaultSymbolCacheSize = 10000 |
Private Attributes | |
const std::unique_ptr< ElfCache > | elfCache_ |
const std::unique_ptr< SymbolizePrinter > | printer_ |
Symbolizer | symbolizer_ |
Static Private Attributes | |
static constexpr size_t | kMaxStackTraceDepth = 100 |
Use this class to print a stack trace from normal code. It will malloc and won't flush or sync.
These methods are thread safe, through locking. However, they are not signal safe.
Definition at line 397 of file Symbolizer.h.
|
explicit |
Definition at line 463 of file Symbolizer.cpp.
References folly::symbolizer::countLoadedElfFiles(), elfCache_, folly::symbolizer::Dwarf::FULL, max, folly::gen::move, printer_, and symbolizer_.
folly::symbolizer::FastStackTracePrinter::~FastStackTracePrinter | ( | ) |
Definition at line 477 of file Symbolizer.cpp.
void folly::symbolizer::FastStackTracePrinter::flush | ( | ) |
Definition at line 505 of file Symbolizer.cpp.
References addr, and printer_.
void folly::symbolizer::FastStackTracePrinter::printStackTrace | ( | bool | symbolize | ) |
This is NOINLINE to make sure it shows up in the stack we grab, which makes it easy to skip printing it.
Definition at line 479 of file Symbolizer.cpp.
References folly::symbolizer::FrameArray< N >::addresses, folly::symbolizer::AddressFormatter::format(), folly::symbolizer::FrameArray< N >::frameCount, folly::symbolizer::getStackTraceSafe(), i, printer_, SCOPE_EXIT, folly::symbolizer::Symbolizer::symbolize(), and symbolizer_.
|
private |
Definition at line 419 of file Symbolizer.h.
Referenced by FastStackTracePrinter().
|
static |
Definition at line 399 of file Symbolizer.h.
|
staticprivate |
Definition at line 417 of file Symbolizer.h.
|
private |
Definition at line 420 of file Symbolizer.h.
Referenced by FastStackTracePrinter(), flush(), and printStackTrace().
|
private |
Definition at line 421 of file Symbolizer.h.
Referenced by FastStackTracePrinter(), and printStackTrace().