ETISS 0.8.0
Extendable Translating Instruction Set Simulator (version 0.8.0)
Classes | Public Member Functions | Public Attributes | Private Member Functions | Private Attributes | List of all members
etiss::interfaces::dot::ValueOperationTraceGraphStreamer Class Reference

#include <Dot.h>

Collaboration diagram for etiss::interfaces::dot::ValueOperationTraceGraphStreamer:
Collaboration graph
[legend]

Classes

class  Link
 
class  Node
 

Public Member Functions

 ValueOperationTraceGraphStreamer (const std::string &file, const std::string &depfile)
 
 ~ValueOperationTraceGraphStreamer ()
 
void defineNode (const void *id, const std::string &name)
 
void undefineNode (const void *id)
 
void link (const void *dst, std::initializer_list< const void * > sources, const char *label=0)
 
void close ()
 
void flush ()
 
const std::unordered_set< std::pair< const void *, const void * > > & staticDependencies () const
 

Public Attributes

bool enable_default_graph_streaming_
 set to false to disable the streaming of variable dependencies over time. More...
 
std::function< void(Node *)> setCurrentNodeAttr
 
std::function< void(Link *, Node *, Node *const *, size_t, std::initializer_list< const void * > &, const char *)> setCurrentLinkAttr
 
std::function< void(Link *, const etiss::ExpandingNativeStack< Link *, 1000 > &)> setMetaLinkAttr
 
std::function< void(const etiss::ExpandingNativeStack< Link *, 1000 > &)> custWritePath
 
std::function< bool(const etiss::ExpandingNativeStack< Link *, 1000 > &)> hidePath
 

Private Member Functions

void writePath ()
 
void traverse (Node *n)
 
NodeopenDestNode (const void *const dst, Node *&cleanup)
 
NodeopenSourceNode (const void *const src)
 

Private Attributes

etiss::ExpandingNativeStack< Link *, 1000 > path
 
uint64_t nnodeid_
 
etiss::FixedSizeHashMap< Node *, uint64_t, etiss::pointerHash< const void > > nodeToTmpId_
 
etiss::FixedSizeHashMap< const void *, Node *, etiss::pointerHash< const void > > currentnodes_
 
etiss::FixedSizeHashMap< const void *, std::string, etiss::pointerHash< const void > > nodes_
 
std::unordered_set< std::pair< const void *, const void * > > dependencies_
 
std::ofstream out
 
std::ofstream depout
 
etiss::ObjectPool< Nodenode_alloc_
 
etiss::ObjectPool< Linklink_alloc_
 
char out_buf [256 *256]
 
char depout_buf [256 *256]
 
bool closed_
 

Detailed Description

Definition at line 290 of file Dot.h.

Constructor & Destructor Documentation

◆ ValueOperationTraceGraphStreamer()

etiss::interfaces::dot::ValueOperationTraceGraphStreamer::ValueOperationTraceGraphStreamer ( const std::string &  file,
const std::string &  depfile 
)

Definition at line 331 of file Dot.cpp.

References closed_, dependencies_, depout, depout_buf, enable_default_graph_streaming_, out, and out_buf.

◆ ~ValueOperationTraceGraphStreamer()

etiss::interfaces::dot::ValueOperationTraceGraphStreamer::~ValueOperationTraceGraphStreamer ( )

Definition at line 358 of file Dot.cpp.

References close().

Here is the call graph for this function:

Member Function Documentation

◆ close()

void etiss::interfaces::dot::ValueOperationTraceGraphStreamer::close ( )

Definition at line 701 of file Dot.cpp.

References closed_, depout, and out.

Referenced by ~ValueOperationTraceGraphStreamer().

Here is the caller graph for this function:

◆ defineNode()

void etiss::interfaces::dot::ValueOperationTraceGraphStreamer::defineNode ( const void *  id,
const std::string &  name 
)

Definition at line 363 of file Dot.cpp.

References closed_, depout, and nodes_.

◆ flush()

void etiss::interfaces::dot::ValueOperationTraceGraphStreamer::flush ( )

Definition at line 712 of file Dot.cpp.

References depout, and out.

◆ link()

void etiss::interfaces::dot::ValueOperationTraceGraphStreamer::link ( const void *  dst,
std::initializer_list< const void * >  sources,
const char *  label = 0 
)

◆ openDestNode()

ValueOperationTraceGraphStreamer::Node * etiss::interfaces::dot::ValueOperationTraceGraphStreamer::openDestNode ( const void *const  dst,
Node *&  cleanup 
)
private

Definition at line 410 of file Dot.cpp.

References currentnodes_, node_alloc_, and setCurrentNodeAttr.

Referenced by link().

Here is the caller graph for this function:

◆ openSourceNode()

ValueOperationTraceGraphStreamer::Node * etiss::interfaces::dot::ValueOperationTraceGraphStreamer::openSourceNode ( const void *const  src)
private

Definition at line 391 of file Dot.cpp.

References currentnodes_, node_alloc_, and setCurrentNodeAttr.

Referenced by link().

Here is the caller graph for this function:

◆ staticDependencies()

const std::unordered_set< std::pair< const void *, const void * > > & etiss::interfaces::dot::ValueOperationTraceGraphStreamer::staticDependencies ( ) const

Definition at line 718 of file Dot.cpp.

References dependencies_.

◆ traverse()

void etiss::interfaces::dot::ValueOperationTraceGraphStreamer::traverse ( Node n)
private

◆ undefineNode()

void etiss::interfaces::dot::ValueOperationTraceGraphStreamer::undefineNode ( const void *  id)

Definition at line 371 of file Dot.cpp.

References closed_, currentnodes_, etiss::FixedSizeHashMap< K, V, hashFunc, log2_buckets >::erase(), nodes_, and traverse().

Here is the call graph for this function:

◆ writePath()

void etiss::interfaces::dot::ValueOperationTraceGraphStreamer::writePath ( )
private

Member Data Documentation

◆ closed_

bool etiss::interfaces::dot::ValueOperationTraceGraphStreamer::closed_
private

Definition at line 406 of file Dot.h.

Referenced by close(), defineNode(), link(), undefineNode(), and ValueOperationTraceGraphStreamer().

◆ currentnodes_

etiss::FixedSizeHashMap<const void *, Node *, etiss::pointerHash<const void> > etiss::interfaces::dot::ValueOperationTraceGraphStreamer::currentnodes_
private

Definition at line 380 of file Dot.h.

Referenced by openDestNode(), openSourceNode(), traverse(), and undefineNode().

◆ custWritePath

std::function<void(const etiss::ExpandingNativeStack<Link *, 1000> &)> etiss::interfaces::dot::ValueOperationTraceGraphStreamer::custWritePath

Definition at line 396 of file Dot.h.

Referenced by writePath().

◆ dependencies_

std::unordered_set<std::pair<const void *, const void *> > etiss::interfaces::dot::ValueOperationTraceGraphStreamer::dependencies_
private

Definition at line 385 of file Dot.h.

Referenced by staticDependencies(), ValueOperationTraceGraphStreamer(), and writePath().

◆ depout

std::ofstream etiss::interfaces::dot::ValueOperationTraceGraphStreamer::depout
private

Definition at line 388 of file Dot.h.

Referenced by close(), defineNode(), flush(), ValueOperationTraceGraphStreamer(), and writePath().

◆ depout_buf

char etiss::interfaces::dot::ValueOperationTraceGraphStreamer::depout_buf[256 *256]
private

Definition at line 404 of file Dot.h.

Referenced by ValueOperationTraceGraphStreamer().

◆ enable_default_graph_streaming_

bool etiss::interfaces::dot::ValueOperationTraceGraphStreamer::enable_default_graph_streaming_

set to false to disable the streaming of variable dependencies over time.

in that case only the static dependencies are streamed and custWritePath is used

Definition at line 366 of file Dot.h.

Referenced by ValueOperationTraceGraphStreamer(), and writePath().

◆ hidePath

std::function<bool(const etiss::ExpandingNativeStack<Link *, 1000> &)> etiss::interfaces::dot::ValueOperationTraceGraphStreamer::hidePath

Definition at line 397 of file Dot.h.

Referenced by writePath().

◆ link_alloc_

etiss::ObjectPool<Link> etiss::interfaces::dot::ValueOperationTraceGraphStreamer::link_alloc_
private

Definition at line 401 of file Dot.h.

Referenced by link(), traverse(), and writePath().

◆ nnodeid_

uint64_t etiss::interfaces::dot::ValueOperationTraceGraphStreamer::nnodeid_
private

Definition at line 378 of file Dot.h.

Referenced by writePath().

◆ node_alloc_

etiss::ObjectPool<Node> etiss::interfaces::dot::ValueOperationTraceGraphStreamer::node_alloc_
private

Definition at line 400 of file Dot.h.

Referenced by openDestNode(), openSourceNode(), and traverse().

◆ nodes_

etiss::FixedSizeHashMap<const void *, std::string, etiss::pointerHash<const void> > etiss::interfaces::dot::ValueOperationTraceGraphStreamer::nodes_
private

Definition at line 383 of file Dot.h.

Referenced by defineNode(), link(), traverse(), undefineNode(), and writePath().

◆ nodeToTmpId_

etiss::FixedSizeHashMap<Node *, uint64_t, etiss::pointerHash<const void> > etiss::interfaces::dot::ValueOperationTraceGraphStreamer::nodeToTmpId_
private

Definition at line 379 of file Dot.h.

Referenced by traverse(), and writePath().

◆ out

std::ofstream etiss::interfaces::dot::ValueOperationTraceGraphStreamer::out
private

◆ out_buf

char etiss::interfaces::dot::ValueOperationTraceGraphStreamer::out_buf[256 *256]
private

Definition at line 403 of file Dot.h.

Referenced by ValueOperationTraceGraphStreamer().

◆ path

etiss::ExpandingNativeStack<Link *, 1000> etiss::interfaces::dot::ValueOperationTraceGraphStreamer::path
private

Definition at line 373 of file Dot.h.

Referenced by traverse(), and writePath().

◆ setCurrentLinkAttr

std::function<void(Link *, Node * , Node *const * , size_t , std::initializer_list<const void *> & , const char * )> etiss::interfaces::dot::ValueOperationTraceGraphStreamer::setCurrentLinkAttr

Definition at line 394 of file Dot.h.

Referenced by link().

◆ setCurrentNodeAttr

std::function<void(Node *)> etiss::interfaces::dot::ValueOperationTraceGraphStreamer::setCurrentNodeAttr

Definition at line 391 of file Dot.h.

Referenced by openDestNode(), and openSourceNode().

◆ setMetaLinkAttr

std::function<void(Link *, const etiss::ExpandingNativeStack<Link *, 1000> &)> etiss::interfaces::dot::ValueOperationTraceGraphStreamer::setMetaLinkAttr

Definition at line 395 of file Dot.h.

Referenced by writePath().


The documentation for this class was generated from the following files: