Basic heap tracing framework + debugger command
Adds an extension command to the debugger which provides heap tracing functionality, and adds the framework needed to get heap traces. The heaptrace command can dump the current heap to the debugger session or it can save a GraphViz specification to a file. I'm hoping to add a backend which can put the graph in GML format, so it can be explored interactively. I also hope at some point to see this integrated into FBIDE if we can do that.
Esse commit está contido em:
@@ -581,5 +581,19 @@ void ArrayData::dump(std::ostream &out) {
|
||||
}
|
||||
}
|
||||
|
||||
void ArrayData::getChildren(std::vector<TypedValue *> &out) {
|
||||
if (isSharedMap()) {
|
||||
SharedMap *sm = static_cast<SharedMap *>(this);
|
||||
sm->getChildren(out);
|
||||
return;
|
||||
}
|
||||
for (ssize_t pos = iter_begin();
|
||||
pos != ArrayData::invalid_index;
|
||||
pos = iter_advance(pos)) {
|
||||
TypedValue *tv = nvGetValueRef(pos);
|
||||
out.push_back(tv);
|
||||
}
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
}
|
||||
|
||||
Referência em uma Nova Issue
Bloquear um usuário