pipeline: add TypeHandle for CycleData if DO_PIPELINING is set

This helps to identify CycleData when tracking memory usage via MemoryUsage.
This commit is contained in:
rdb 2018-06-22 20:52:44 +02:00
parent 0367c73026
commit 582cc2991e
3 changed files with 21 additions and 0 deletions

View File

@ -12,6 +12,7 @@
*/ */
#include "config_pipeline.h" #include "config_pipeline.h"
#include "cycleData.h"
#include "mainThread.h" #include "mainThread.h"
#include "externalThread.h" #include "externalThread.h"
#include "genericThread.h" #include "genericThread.h"
@ -70,6 +71,7 @@ init_libpipeline() {
} }
initialized = true; initialized = true;
CycleData::init_type();
MainThread::init_type(); MainThread::init_type();
ExternalThread::init_type(); ExternalThread::init_type();
GenericThread::init_type(); GenericThread::init_type();

View File

@ -13,6 +13,9 @@
#include "cycleData.h" #include "cycleData.h"
#ifdef DO_PIPELINING
TypeHandle CycleData::_type_handle;
#endif
/** /**
* *

View File

@ -65,6 +65,22 @@ public:
virtual TypeHandle get_parent_type() const; virtual TypeHandle get_parent_type() const;
virtual void output(std::ostream &out) const; virtual void output(std::ostream &out) const;
#ifdef DO_PIPELINING
public:
static TypeHandle get_class_type() {
return _type_handle;
}
static void init_type() {
NodeReferenceCount::init_type();
register_type(_type_handle, "CycleData",
NodeReferenceCount::get_class_type());
}
private:
static TypeHandle _type_handle;
#endif
}; };
INLINE std::ostream & INLINE std::ostream &