FastLED 3.9.15
Loading...
Searching...
No Matches

◆ dump() [2/2]

void fl::ScopedTrace::dump ( fl::vector< TracePoint > * out)
static

Dump the current call stack to an inlined vector of TracePoints.

Parameters
outPointer to vector to receive the stack trace entries

Definition at line 135 of file trace.cpp.hpp.

135 {
136 if (!out) {
137 return;
138 }
139
140 auto& storage = getTraceStorage();
141 out->clear();
142
143 // Copy all stored entries to the output vector as TracePoints
144 for (fl::size i = 0; i < storage.callStack.size(); ++i) {
145 const auto& entry = storage.callStack[i];
146 // TracePoint is tuple<const char*, int, fl::u32> (file, line, timestamp)
147 // Since we don't store file or timestamp, we'll use the function name and line
148 out->push_back(fl::make_tuple(entry.function, entry.line, fl::u32(0)));
149 }
150}
void clear() FL_NOEXCEPT
Definition vector.h:634
void push_back(const T &value) FL_NOEXCEPT
Definition vector.h:624
static TraceStorage & getTraceStorage() FL_NOEXCEPT
Definition trace.cpp.hpp:48
tuple< typename fl::decay< Ts >::type... > make_tuple(Ts &&... args) FL_NOEXCEPT
Definition tuple.h:104

References FL_NOEXCEPT, fl::getTraceStorage(), and fl::make_tuple().

+ Here is the call graph for this function: