base::debug::StackTrace is currently hard-wired to generate at most 62 frames, due to limitations of the platform stack-walking API on some systems. The class includes an in-line array of stack pointers with 62 entries:
For crash back-traces this will typically be sufficient.
For memory-infra, where we ideally want to trace all the way back to the top frame of the thread's stack, we need to be able to capture more frames in some cases.
For stack-trace print-out by developers for debugging, 62 frames is often overkill; we recently added a max-depth parameter to the StackTrace constructor to optimize this case.
If we templatize StackTrace on the max-depth parameter then we can continue to declare the stack array inline in the class, while allow different max-depth specializations for different use-cases; all specializations will use the same underlying stack capture impls (which may use different techniques depending on the max-depth required, for example).
Comment 1 by w...@chromium.org
, Mar 9 2017Status: Assigned (was: Untriaged)