载入中...
搜索中...
未找到
eve::dev::CallGraph类 参考

Runtime call graph + dynamic data-flow tracer with backward slicing. 更多...

#include <CallGraph.hpp>

class  EventsView
 Chronological view over the live ring window (oldest → newest). 更多...
 

Public 成员函数

 CallGraph ()
 
 ~CallGraph ()
 
 CallGraph (const CallGraph &)=delete
 
CallGraphoperator= (const CallGraph &)=delete
 
void clear ()
 
void setMaxEvents (size_t n)
 
size_t maxEvents () const
 
size_t eventCount () const
 
uint32_t onCall (const SourceLoc &loc, const std::string &funcName={})
 
uint32_t onReturn (const SourceLoc &loc, const std::string &funcName={})
 
uint32_t onLine (const SourceLoc &loc)
 
uint32_t onDef (const SourceLoc &loc, const std::string &var)
 
uint32_t onUse (const SourceLoc &loc, const std::string &var)
 
uint32_t enter (const SourceLoc &loc, const std::string &funcName)
 Convenience: Call then Line at the same site.
 
EventsView events () const
 
const TraceEventevent (uint32_t id) const
 
std::vector< CallFramecurrentStack () const
 
std::vector< CallFramestackAt (uint32_t eventId) const
 Stack reconstructed at (or just before) a given event.
 
std::vector< std::pair< SourceLoc, SourceLoc > > callEdges () const
 
SliceResult sliceBackward (const SliceCriterion &criterion) const
 Dynamic backward slice from an error criterion. Follows data dependencies (Use←Def) and control predecessors (line order + call/return nesting) until a fixed point.
 
std::string formatErrorReport (const std::string &errorMessage, const SliceCriterion &criterion) const
 Human-readable report: message + call stack + data-flow + slice locs.
 

友元

class EventsView
 
class EventsView::const_iterator
 

详细描述

Runtime call graph + dynamic data-flow tracer with backward slicing.

Feed events from a Squirrel debug hook (see DevTool) or manually in tests. On script failure, use sliceBackward() to recover the statements and definitions that influenced the error site — analogous to a dynamic slicer.

Event storage is a fixed ring buffer: when full, the write cursor advances and overwrites the oldest slot in place (O(1); monotonic ids).

在文件 CallGraph.hpp81 行定义.

构造及析构函数说明

◆ CallGraph() [1/2]

eve::dev::CallGraph::CallGraph ( )
default

◆ ~CallGraph()

eve::dev::CallGraph::~CallGraph ( )
default

◆ CallGraph() [2/2]

eve::dev::CallGraph::CallGraph ( const CallGraph )
delete

成员函数说明

◆ callEdges()

std::vector< std::pair< SourceLoc, SourceLoc > > eve::dev::CallGraph::callEdges ( ) const

◆ clear()

void eve::dev::CallGraph::clear ( )

在文件 CallGraph.cpp31 行定义.

被这些函数引用 eve::dev::DevTool::attach().

◆ currentStack()

std::vector< CallFrame > eve::dev::CallGraph::currentStack ( ) const

在文件 CallGraph.cpp211 行定义.

引用了 event(), f , 以及 eve::dev::CallFrame::frameId.

被这些函数引用 eve::dev::DevTool::handleDebugEvent() , 以及 eve::dev::mcpCallgraphStackDepth().

◆ enter()

uint32_t eve::dev::CallGraph::enter ( const SourceLoc loc,
const std::string &  funcName 
)

Convenience: Call then Line at the same site.

在文件 CallGraph.cpp198 行定义.

引用了 onCall() , 以及 onLine().

◆ event()

const TraceEvent * eve::dev::CallGraph::event ( uint32_t  id) const

在文件 CallGraph.cpp203 行定义.

引用了 eve::dev::TraceEvent::id.

被这些函数引用 currentStack(), formatErrorReport(), sliceBackward() , 以及 stackAt().

◆ eventCount()

size_t eve::dev::CallGraph::eventCount ( ) const
inline

在文件 CallGraph.hpp92 行定义.

◆ events()

EventsView eve::dev::CallGraph::events ( ) const
inline

◆ formatErrorReport()

std::string eve::dev::CallGraph::formatErrorReport ( const std::string &  errorMessage,
const SliceCriterion criterion 
) const

◆ maxEvents()

size_t eve::dev::CallGraph::maxEvents ( ) const
inline

在文件 CallGraph.hpp91 行定义.

◆ onCall()

uint32_t eve::dev::CallGraph::onCall ( const SourceLoc loc,
const std::string &  funcName = {} 
)

◆ onDef()

uint32_t eve::dev::CallGraph::onDef ( const SourceLoc loc,
const std::string &  var 
)

在文件 CallGraph.cpp139 行定义.

引用了 eve::dev::Def, eve::dev::TraceEvent::frameId , 以及 id.

◆ onLine()

uint32_t eve::dev::CallGraph::onLine ( const SourceLoc loc)

在文件 CallGraph.cpp135 行定义.

引用了 eve::dev::Line.

被这些函数引用 enter() , 以及 eve::dev::DevTool::handleDebugEvent().

◆ onReturn()

uint32_t eve::dev::CallGraph::onReturn ( const SourceLoc loc,
const std::string &  funcName = {} 
)

◆ onUse()

uint32_t eve::dev::CallGraph::onUse ( const SourceLoc loc,
const std::string &  var 
)

在文件 CallGraph.cpp154 行定义.

引用了 id , 以及 eve::dev::Use.

◆ operator=()

CallGraph & eve::dev::CallGraph::operator= ( const CallGraph )
delete

◆ setMaxEvents()

void eve::dev::CallGraph::setMaxEvents ( size_t  n)

在文件 CallGraph.cpp47 行定义.

引用了 n.

◆ sliceBackward()

◆ stackAt()

std::vector< CallFrame > eve::dev::CallGraph::stackAt ( uint32_t  eventId) const

Stack reconstructed at (or just before) a given event.

在文件 CallGraph.cpp227 行定义.

引用了 eve::dev::Call, event(), f, eve::dev::TraceEvent::frameId, eve::dev::CallFrame::frameId, eve::dev::TraceEvent::id, eve::dev::TraceEvent::kind, eve::dev::TraceEvent::loc , 以及 eve::dev::Return.

被这些函数引用 sliceBackward().

友元及相关函数文档

◆ EventsView

friend class EventsView
friend

在文件 CallGraph.hpp175 行定义.

◆ EventsView::const_iterator

friend class EventsView::const_iterator
friend

在文件 CallGraph.hpp176 行定义.


该类的文档由以下文件生成: