60 #ifndef prof_Prof_Struct_Tree_hpp 61 #define prof_Prof_Struct_Tree_hpp 113 class GroupMap :
public std::map<std::string, Group*> { };
116 class LMMap :
public std::map<std::string, LM*> { };
122 class ProcMap :
public std::multimap<std::string, Proc*> { };
125 class FileMap :
public std::map<std::string, File*> { };
128 class StmtMap :
public std::map<SrcFile::ln, Stmt*> { };
148 OFlg_Compressed = (1 << 1),
149 OFlg_LeafMetricsOnly = (1 << 2),
150 OFlg_Debug = (1 << 3)
169 {
Tree(name.c_str(), root); }
187 {
return (m_root ==
NULL); }
197 writeXML(std::ostream& os = std::cerr,
uint oFlags = 0)
const;
201 dump(std::ostream& os = std::cerr,
uint oFlags = 0)
const;
214 bool prettyPrint =
true);
270 static const std::string&
273 static const std::string&
274 ANodeTyToXMLelement(
ANodeTy tp);
277 IntToANodeTy(
long i);
280 static const std::string ScopeNames[TyNUMBER];
292 m_id = s_nextUniqueId++;
298 DIAG_DevMsgIf(0,
"~ANode::ANode: " << toString_id()
299 <<
" " << std::hex <<
this << std::dec);
305 {
return new ANode(*
this); }
347 {
return s_nextUniqueId - 1; }
351 virtual const std::string&
353 {
return ANodeTyToName(type()); }
361 { m_visible =
false; }
365 {
return m_visible ==
true; }
386 if ((parent()->lastChild() !=
this)) {
396 if ((parent()->firstChild() !=
this)) {
417 ancestorRoot()
const;
420 ancestorGroup()
const;
426 ancestorFile()
const;
429 ancestorProc()
const;
432 ancestorAlien()
const;
435 ancestorLoop()
const;
438 ancestorStmt()
const;
441 ancestorProcCtxt()
const;
444 ACodeNodeParent()
const;
455 aggregateMetrics(
uint mBegId,
uint mEndId);
459 { aggregateMetrics(mBegId, mBegId + 1); }
532 toStringXML(
uint oFlags = 0,
const char* pre =
"")
const;
535 toXML(
uint oFlags = 0)
const;
537 virtual std::ostream&
539 const char* pre =
"")
const;
549 CSV_DumpSelf(
const Root &root, std::ostream& os = std::cout)
const;
552 CSV_dump(
const Root &root, std::ostream& os = std::cout,
553 const char* file_name =
NULL,
554 const char* proc_name =
NULL,
555 int lLevel = 0)
const;
562 toString(
uint oFlags = 0,
const char* pre =
"")
const;
565 toString_id(
uint oFlags = 0)
const;
568 toStringMe(
uint oFlags = 0,
const char* pre =
"")
const;
572 dump(std::ostream& os = std::cerr,
uint oFlags = 0,
573 const char* pre =
"")
const;
577 virtual std::ostream&
578 dumpme(std::ostream& os = std::cerr,
uint oFlags = 0,
579 const char* pre =
"")
const;
583 writeXML_pre(std::ostream& os = std::cout,
uint oFlags = 0,
584 const char*
prefix =
"")
const;
587 writeXML_post(std::ostream& os = std::cout,
uint oFlags = 0,
588 const char*
prefix =
"")
const;
618 VMA begVMA = 0,
VMA endVMA = 0)
621 m_lineno_frozen =
false;
622 setLineRange(begLn, endLn);
624 m_vmaSet.insert(begVMA, endVMA);
696 "ACodeNode::checkLineRange: b=" << begLn <<
" e=" << endLn);
697 DIAG_Assert(begLn <= endLn,
698 "ACodeNode::checkLineRange: b=" << begLn <<
" e=" << endLn);
700 "ACodeNode::checkLineRange: b=" << m_begLn <<
" e=" << m_endLn);
705 { m_lineno_frozen =
true; }
709 { m_lineno_frozen =
false; }
739 {
return (m_begLn !=
ln_NULL && (m_begLn <= ln && ln <= m_endLn)); }
742 containsLine(
SrcFile::ln ln,
int beg_epsilon,
int end_epsilon)
const;
746 {
return (containsLine(begLn) && containsLine(endLn)); }
750 int beg_epsilon,
int end_epsilon)
const 751 {
return (containsLine(begLn, beg_epsilon, end_epsilon)
752 && containsLine(endLn, beg_epsilon, end_epsilon)); }
765 nextSiblingNonOverlapping()
const;
774 {
return codeName(); }
794 toXML(
uint oFlags = 0)
const;
797 XMLLineRange(
uint oFlags)
const;
800 XMLVMAIntervals(
uint oFlags)
const;
803 CSV_dump(
const Root &root, std::ostream& os = std::cout,
804 const char* file_name =
NULL,
const char* proc_name =
NULL,
805 int lLevel = 0)
const;
811 virtual std::ostream&
812 dumpme(std::ostream& os = std::cerr,
uint oFlags = 0,
813 const char* pre =
"")
const;
829 std::string codeName_LM_F()
const;
848 m_scope_filenm = file;
849 m_scope_lineno = line;
874 operator=(
const Root& x);
892 delete lmMap_realpath;
893 delete lmMap_basename;
896 virtual const std::string&
902 { m_name = (x) ? x :
""; }
916 findLM(
const char* nm)
const;
920 {
return findLM(nm.c_str()); }
925 GroupMap::iterator it = groupMap->find(nm);
926 Group* x = (it != groupMap->end()) ? it->second :
NULL;
932 {
return findGroup(nm.c_str()); }
936 {
return new Root(*
this); }
944 toXML(
uint oFlags = 0)
const;
946 virtual std::ostream&
948 const char* pre =
"")
const;
951 CSV_TreeDump(std::ostream& os = std::cout)
const;
957 virtual std::ostream&
958 dumpme(std::ostream& os = std::cerr,
uint oFlags = 0,
959 const char* pre =
"")
const;
964 Ctor(
const char* nm);
967 insertGroupMap(
Group* grp);
997 VMA begVMA = 0,
VMA endVMA = 0)
1020 :
ACodeNode(TyGroup, parent, begLn, endLn, 0, 0)
1027 :
ACodeNode(TyGroup, parent, begLn, endLn, 0, 0)
1029 Ctor(nm.c_str(), parent);
1036 demand(
Root* pgm,
const std::string& nm,
ANode* parent);
1038 virtual const std::string&
1047 {
return new Group(*
this); }
1050 toXML(
uint oFlags = 0)
const;
1056 virtual std::ostream&
1057 dumpme(std::ostream& os = std::cerr,
uint oFlags = 0,
1058 const char* pre =
"")
const;
1062 Ctor(
const char* nm,
ANode* parent);
1076 operator=(
const LM& x);
1092 Ctor(nm.c_str(), parent);
1104 {
return new LM(*
this); }
1107 demand(
Root* pgm,
const std::string& lm_fnm);
1114 virtual const std::string&
1124 {
return m_pretty_name.c_str(); }
1128 { m_pretty_name = nm; }
1141 findFile(
const char* nm)
const;
1145 {
return findFile(nm.c_str()); }
1159 findByVMA(
VMA vma)
const;
1174 findProc(
VMA vma)
const;
1180 insertInMap(m_procMap, proc);
1188 findStmt(
VMA vma)
const;
1194 insertInMap(m_stmtMap, stmt);
1204 eraseFromMap(m_stmtMap, stmt);
1216 toXML(
uint oFlags = 0)
const;
1218 virtual std::ostream&
1219 writeXML(std::ostream& os = std::cout,
uint oFlags = 0,
1220 const char* pre =
"")
const;
1223 virtual std::ostream&
1224 dumpme(std::ostream& os = std::cerr,
uint oFlags = 0,
1225 const char* pre =
"")
const;
1231 verifyStmtMap()
const;
1239 Ctor(
const char* nm,
ANode* parent);
1242 insertFileMap(
File* file);
1245 template<
typename T>
1249 template<
typename T>
1255 it != vmaset.end(); ++it) {
1258 mp->insert(std::make_pair(vmaint, x));
1263 template<
typename T>
1269 it != vmaset.end(); ++it) {
1276 template<
typename T>
1315 operator=(
const File& x);
1324 :
ACodeNode(TyFile, parent, begLn, endLn, 0, 0)
1326 Ctor(filenm, parent);
1331 :
ACodeNode(TyFile, parent, begLn, endLn, 0, 0)
1333 Ctor(filenm.c_str(), parent);
1343 {
return new File(*
this); }
1346 demand(
LM* lm,
const std::string& filenm);
1353 virtual const std::string&
1381 findProc(
const char* name,
const char* linkname =
NULL)
const;
1384 findProc(
const std::string& name,
const std::string& linkname =
"")
const 1385 {
return findProc(name.c_str(), linkname.c_str()); }
1393 toXML(
uint oFlags = 0)
const;
1396 CSV_dump(
const Root &root, std::ostream& os = std::cout,
1397 const char* file_name =
NULL,
const char* proc_name =
NULL,
1398 int lLevel = 0)
const;
1400 virtual std::ostream&
1401 dumpme(std::ostream& os = std::cerr,
uint oFlags = 0,
1402 const char* pre =
"")
const;
1406 Ctor(
const char* filenm,
ANode* parent);
1409 insertProcMap(
Proc* proc);
1437 operator=(
const Proc& x);
1446 :
ACodeNode(TyProc, parent, begLn, endLn, 0, 0)
1448 Ctor(name, parent, linkname, hasSym);
1453 :
ACodeNode(TyProc, parent, begLn, endLn, 0, 0)
1455 Ctor(name.c_str(), parent, linkname.c_str(), hasSym);
1465 {
return new Proc(*
this); }
1471 demand(
File* file,
const std::string& name,
const std::string& linkname,
1473 bool* didCreate =
NULL);
1484 virtual const std::string&
1494 { m_name = (x) ? x :
""; }
1502 {
return m_linkname; }
1506 {
return m_hasSym; }
1521 StmtMap::iterator it = m_stmtMap->find(begLn);
1522 Stmt* x = (it != m_stmtMap->end()) ? it->second :
NULL;
1532 toXML(
uint oFlags = 0)
const;
1535 CSV_dump(
const Root &root, std::ostream& os = std::cout,
1536 const char* file_name =
NULL,
const char* proc_name =
NULL,
1537 int lLevel = 0)
const;
1539 virtual std::ostream&
1540 dumpme(std::ostream& os = std::cerr,
uint oFlags = 0,
1541 const char* pre =
"")
const;
1545 Ctor(
const char*
n,
ACodeNode* parent,
const char*
ln,
bool hasSym);
1548 insertStmtMap(
Stmt* stmt);
1577 operator=(
const Alien& x);
1585 const char* displaynm,
1587 :
ACodeNode(TyAlien, parent, begLn, endLn, 0, 0)
1589 Ctor(parent, filenm, procnm, displaynm);
1593 const std::string& filenm,
const std::string& procnm,
1594 const std::string& displaynm,
1596 :
ACodeNode(TyAlien, parent, begLn, endLn, 0, 0)
1598 Ctor(parent, filenm.c_str(), procnm.c_str(), displaynm.c_str());
1606 {
return new Alien(*
this); }
1615 {
return m_filenm; }
1621 virtual const std::string&
1639 {
return m_displaynm; }
1650 toXML(
uint oFlags = 0)
const;
1653 CSV_dump(
const Root &root, std::ostream& os = std::cout,
1654 const char* file_name =
NULL,
const char* proc_name =
NULL,
1655 int lLevel = 0)
const;
1657 virtual std::ostream&
1658 dumpme(std::ostream& os = std::cerr,
uint oFlags = 0,
1659 const char* pre =
"")
const;
1663 Ctor(
ACodeNode* parent,
const char* filenm,
const char* procnm,
1664 const char* displaynm);
1692 :
ACodeNode(TyLoop, parent, begLn, endLn, 0, 0)
1696 DIAG_Assert((parent ==
NULL) || (t == TyGroup) || (t == TyFile) ||
1697 (t == TyProc) || (t == TyAlien) || (t == TyLoop),
"");
1700 void setFile(std::string filenm);
1707 {
return new Loop(*
this); }
1723 toXML(
uint oFlags = 0)
const;
1725 virtual std::ostream&
1726 dumpme(std::ostream& os = std::cerr,
uint oFlags = 0,
1727 const char* pre =
"")
const;
1731 {
return m_filenm; }
1754 VMA begVMA = 0,
VMA endVMA = 0)
1755 :
ACodeNode(TyStmt, parent, begLn, endLn, begVMA, endVMA),
1756 m_sortId((int)begLn)
1759 DIAG_Assert((parent ==
NULL) || (t == TyGroup) || (t == TyFile)
1760 || (t == TyProc) || (t == TyAlien) || (t == TyLoop),
"");
1763 Proc* pStrct = ancestorProc();
1768 if (lmStrct && begVMA) {
1780 {
return new Stmt(*
this); }
1787 virtual std::string codeName()
const;
1792 {
return m_sortId; }
1804 toXML(
uint oFlags = 0)
const;
1806 virtual std::ostream&
1807 dumpme(std::ostream& os = std::cerr,
uint oFlags = 0,
1808 const char* pre =
"")
const;
1822 Ref(
ACodeNode* parent,
int _begPos,
int _endPos,
const char* refName);
1833 virtual const std::string&
1842 {
return new Ref(*
this); }
1845 toXML(
uint oFlags = 0)
const;
1851 virtual std::ostream&
1852 dumpme(std::ostream& os = std::cerr,
uint oFlags = 0,
1853 const char* pre =
"")
const;
SrcFile::ln getScopeLineNum()
Proc * findProc(const std::string &name, const std::string &linkname="") const
void insertInMap(VMAIntervalMap< T > *mp, T x) const
static uint s_nextUniqueId
static const std::string PartialUnwindProcNm
void aggregateMetrics(uint mBegId)
static const std::string UnknownFileNm
void name(const std::string &fname)
void fileName(const std::string &fnm)
ANode & operator=(const ANode &x)
My_t::const_iterator const_iterator
void checkLineRange(SrcFile::ln begLn, SrcFile::ln endLn)
static const std::string UnknownGlobalVariable
File * findFile(const std::string &nm) const
Group(const std::string &nm, ANode *parent, int begLn=ln_NULL, int endLn=ln_NULL)
ACodeNode & operator=(const ACodeNode &x)
bool containsInterval(SrcFile::ln begLn, SrcFile::ln endLn) const
void writeXML(std::ostream &os, const Prof::Struct::Tree &strctTree, bool prettyPrint)
File(const char *filenm, ANode *parent, SrcFile::ln begLn=ln_NULL, SrcFile::ln endLn=ln_NULL)
void computeVMAMaps() const
virtual const std::string & name() const
VMAToStmtRangeMap * m_stmtMap
bool equiv(bool p, bool q)
LM(const char *nm, ANode *parent)
virtual const std::string & name() const
bool containsInterval(SrcFile::ln begLn, SrcFile::ln endLn, int beg_epsilon, int end_epsilon) const
Group(const char *nm, ANode *parent, int begLn=ln_NULL, int endLn=ln_NULL)
std::set< ANode * > ANodeSet
bool eraseStmtIf(Stmt *stmt) const
virtual const std::string & name() const
static const std::string UnknownProcNm
void name(const std::string &n)
ANode * nextSibling() const
int compare(SrcFile::ln x, SrcFile::ln y)
void fileName(const std::string &fnm)
Alien(ACodeNode *parent, const char *filenm, const char *procnm, const char *displaynm, SrcFile::ln begLn=ln_NULL, SrcFile::ln endLn=ln_NULL)
const std::string & linkName() const
void name(const std::string &x)
#define DIAG_MsgIf(ifexpr,...)
virtual const std::string & name() const
void(* T)(int code, va_list_box *box, int put(int c, void *cl), void *cl, unsigned char flags[256], int width, int precision)
void name(const std::string &x)
virtual std::string nameQual() const
LM(const std::string &nm, ANode *parent)
const char * pretty_name() const
LM * findLM(const std::string &nm) const
bool insertStmtIf(Stmt *stmt) const
static Proc * demand(File *file, const std::string &name)
SrcFile::ln begLine() const
Prof::Struct::Proc * m_proc
Alien(ACodeNode *parent, const std::string &filenm, const std::string &procnm, const std::string &displaynm, SrcFile::ln begLn=ln_NULL, SrcFile::ln endLn=ln_NULL)
VMAIntervalMap< Stmt * > VMAToStmtRangeMap
VMAIntervalMap< Proc * > VMAToProcMap
Group * findGroup(const char *nm) const
void pretty_name(const char *nm)
static const std::string UnknownLMNm
virtual std::string nameQual() const
virtual const std::string & name() const
ACodeNode(const ACodeNode &x)
virtual const std::string & name() const
std::string & getScopeFileName()
ANode(ANodeTy ty, ANode *parent=NULL)
void eraseFromMap(VMAIntervalMap< T > *mp, T x) const
ANode * firstChild() const
virtual std::string codeName() const
const VMAIntervalSet & vmaSet() const
Loop(ACodeNode *parent, std::string &filenm, SrcFile::ln begLn=ln_NULL, SrcFile::ln endLn=ln_NULL)
std::string m_pretty_name
Stmt * findStmt(SrcFile::ln begLn)
SrcFile::ln m_scope_lineno
ANode * lastChild() const
ANode * prevSibling() const
std::string baseName() const
RealPathMgr & s_realpathMgr
Group * findGroup(const std::string &nm) const
void endLine(SrcFile::ln x)
Proc(const std::string &name, ACodeNode *parent, const std::string &linkname, bool hasSym, SrcFile::ln begLn=ln_NULL, SrcFile::ln endLn=ln_NULL)
const std::string & displayName() const
std::string baseName() const
File(const std::string &filenm, ANode *parent, SrcFile::ln begLn=ln_NULL, SrcFile::ln endLn=ln_NULL)
bool insertProcIf(Proc *proc) const
std::list< ANode * > ANodeList
const std::string & fileName() const
void name(const char *fname)
SrcFile::ln endLine() const
Root(const std::string &nm)
Tree(const std::string &name, Root *root=NULL)
virtual const std::string & name() const
Stmt(ACodeNode *parent, SrcFile::ln begLn, SrcFile::ln endLn, VMA begVMA=0, VMA endVMA=0)
void insertStmtMap(Stmt *stmt)
const std::string & fileName() const
std::string toString() const
void begLine(SrcFile::ln x)
string basename(const char *fName)
IData & operator=(const IData &x)
bool containsLine(SrcFile::ln ln) const
VMAIntervalSet & vmaSet()
<!-- ********************************************************************--> n<!-- HPCToolkit Experiment DTD --> n<!-- Version 2.1 --> n<!-- ********************************************************************--> n<!ELEMENT HPCToolkitExperiment(Header,(SecCallPathProfile|SecFlatProfile) *)> n<!ATTLIST HPCToolkitExperiment\n version CDATA #REQUIRED > n n<!-- ******************************************************************--> n n<!-- Info/NV:flexible name-value pairs:(n) ame;(t) ype;(v) alue --> n<!ELEMENT Info(NV *)> n<!ATTLIST Info\n n CDATA #IMPLIED > n<!ELEMENT NV EMPTY > n<!ATTLIST NV\n n CDATA #REQUIRED\n t CDATA #IMPLIED\n v CDATA #REQUIRED > n n<!-- ******************************************************************--> n<!-- Header --> n<!-- ******************************************************************--> n<!ELEMENT Header(Info *)> n<!ATTLIST Header\n n CDATA #REQUIRED > n n<!-- ******************************************************************--> n<!-- Section Header --> n<!-- ******************************************************************--> n<!ELEMENT SecHeader(MetricTable?, MetricDBTable?, TraceDBTable?, LoadModuleTable?, FileTable?, ProcedureTable?, Info *)> n n<!-- MetricTable:--> n<!ELEMENT MetricTable(Metric) * > n n<!-- Metric:(i) d;(n) ame --> n<!--(v) alue-type:transient type of values --> n<!--(t) ype:persistent type of metric --> n<!-- fmt:format;show;--> n<!ELEMENT Metric(MetricFormula *, Info?)> n<!ATTLIST Metric\n i CDATA #REQUIRED\n n CDATA #REQUIRED\n es CDATA #IMPLIED\n em CDATA #IMPLIED\n ep CDATA #IMPLIED\n v(raw|final|derived-incr|derived) \"raw\\ t (inclusive|exclusive|nil) \nil\\ partner CDATA #IMPLIED\ fmt CDATA #IMPLIED\ show (1|0) \1\\ show-percent (1|0) \1> n n<!-- MetricFormula represents derived metrics: (t)ype; (frm): formula --> n<!ELEMENT MetricFormula (Info?)> n<!ATTLIST MetricFormula\ t (combine|finalize) \finalize\\ i CDATA #IMPLIED\ frm CDATA #REQUIRED> n n<!-- Metric data, used in sections: (n)ame [from Metric]; (v)alue --> n<!ELEMENT M EMPTY> n<!ATTLIST M\ n CDATA #REQUIRED\ v CDATA #REQUIRED> n n<!-- MetricDBTable: --> n<!ELEMENT MetricDBTable (MetricDB)*> n n<!-- MetricDB: (i)d; (n)ame --> n<!-- (t)ype: persistent type of metric --> n<!-- db-glob: file glob describing files in metric db --> n<!-- db-id: id within metric db --> n<!-- db-num-metrics: number of metrics in db --> n<!-- db-header-sz: size (in bytes) of a db file header --> n<!ELEMENT MetricDB EMPTY> n<!ATTLIST MetricDB\ i CDATA #REQUIRED\ n CDATA #REQUIRED\ t (inclusive|exclusive|nil) \nil\\ partner CDATA #IMPLIED\ db-glob CDATA #IMPLIED\ db-id CDATA #IMPLIED\ db-num-metrics CDATA #IMPLIED\ db-header-sz CDATA #IMPLIED> n n<!-- TraceDBTable: --> n<!ELEMENT TraceDBTable (TraceDB)> n n<!-- TraceDB: (i)d --> n<!-- db-min-time: min beginning time stamp (global) --> n<!-- db-max-time: max ending time stamp (global) --> n<!ELEMENT TraceDB EMPTY> n<!ATTLIST TraceDB\ i CDATA #REQUIRED\ db-glob CDATA #IMPLIED\ db-min-time CDATA #IMPLIED\ db-max-time CDATA #IMPLIED\ db-header-sz CDATA #IMPLIED> n n<!-- LoadModuleTable assigns a short name to a load module --> n<!ELEMENT LoadModuleTable (LoadModule)*> n n<!ELEMENT LoadModule (Info?)> n<!ATTLIST LoadModule\ i CDATA #REQUIRED\ n CDATA #REQUIRED> n n<!-- FileTable assigns a short name to a file --> n<!ELEMENT FileTable (File)*> n n<!ELEMENT File (Info?)> n<!ATTLIST File\ i CDATA #REQUIRED\ n CDATA #REQUIRED> n n<!-- ProcedureTable assigns a short name to a procedure --> n<!ELEMENT ProcedureTable (Procedure)*> n n<!-- Info/NV: flexible name-value pairs: (n)ame; (t)ype; (v)alue --> n<!-- f: family of the procedure (fake, root, ...)--> n<!ELEMENT Procedure (Info?)> n<!ATTLIST Procedure\ i CDATA #REQUIRED\ n CDATA #REQUIRED\ f CDATA #IMPLIED> n n<!-- ****************************************************************** --> n<!-- Section: Call path profile --> n<!-- ****************************************************************** --> n<!ELEMENT SecCallPathProfile (SecHeader, SecCallPathProfileData)> n<!ATTLIST SecCallPathProfile\ i CDATA #REQUIRED\ n CDATA #REQUIRED> n n<!ELEMENT SecCallPathProfileData (PF|M)*> n<!-- Procedure frame --> n<!-- (i)d: unique identifier for cross referencing --> n<!-- (s)tatic scope id --> n<!-- (n)ame: a string or an id in ProcedureTable --> n<!-- (lm) load module: a string or an id in LoadModuleTable --> n<!-- (f)ile name: a string or an id in LoadModuleTable --> n<!-- (l)ine range: \beg-end\ (inclusive range) --> n<!-- (a)lien: whether frame is alien to enclosing P --> n<!-- (str)uct: hpcstruct node id --> n<!-- (t)ype: hpcrun node type: memory access, variable declaration, ... --> n<!-- (v)ma-range-set: \{[beg-end), [beg-end)...}\ --> n<!ELEMENT PF (PF|Pr|L|C|S|M)*> n<!ATTLIST PF\ i CDATA #IMPLIED\ s CDATA #IMPLIED\ n CDATA #REQUIRED\ lm CDATA #IMPLIED\ f CDATA #IMPLIED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Procedure (static): GOAL: replace with 'P' --> n<!ELEMENT Pr (Pr|L|C|S|M)*> n<!ATTLIST Pr\ i CDATA #IMPLIED\ s CDATA #IMPLIED\ n CDATA #REQUIRED\ lm CDATA #IMPLIED\ f CDATA #IMPLIED\ l CDATA #IMPLIED\ a (1|0) \0\\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Callsite (a special StatementRange) --> n<!ELEMENT C (PF|M)*> n<!ATTLIST C\ i CDATA #IMPLIED\ s CDATA #IMPLIED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n n<!-- ****************************************************************** --> n<!-- Section: Flat profile --> n<!-- ****************************************************************** --> n<!ELEMENT SecFlatProfile (SecHeader, SecFlatProfileData)> n<!ATTLIST SecFlatProfile\ i CDATA #REQUIRED\ n CDATA #REQUIRED> n n<!ELEMENT SecFlatProfileData (LM|M)*> n<!-- Load module: (i)d; (n)ame; (v)ma-range-set --> n<!ELEMENT LM (F|P|M)*> n<!ATTLIST LM\ i CDATA #IMPLIED\ n CDATA #REQUIRED\ v CDATA #IMPLIED> n<!-- File --> n<!ELEMENT F (P|L|S|M)*> n<!ATTLIST F\ i CDATA #IMPLIED\ n CDATA #REQUIRED> n<!-- Procedure (Note 1) --> n<!ELEMENT P (P|A|L|S|C|M)*> n<!ATTLIST P\ i CDATA #IMPLIED\ n CDATA #REQUIRED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Alien (Note 1) --> n<!ELEMENT A (A|L|S|C|M)*> n<!ATTLIST A\ i CDATA #IMPLIED\ f CDATA #IMPLIED\ n CDATA #IMPLIED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Loop (Note 1,2) --> n<!ELEMENT L (A|Pr|L|S|C|M)*> n<!ATTLIST L\ i CDATA #IMPLIED\ s CDATA #IMPLIED\ l CDATA #IMPLIED\ f CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Statement (Note 2) --> n<!-- (it): trace record identifier --> n<!ELEMENT S (S|M)*> n<!ATTLIST S\ i CDATA #IMPLIED\ it CDATA #IMPLIED\ s CDATA #IMPLIED\ l CDATA #IMPLIED\ str CDATA #IMPLIED\ v CDATA #IMPLIED> n<!-- Note 1: Contained Cs may not contain PFs --> n<!-- Note 2: The 's' attribute is not used for flat profiles --> n
Variable(std::string nm, ANode *parent, VMA begVMA=0, VMA endVMA=0)
virtual const std::string & name() const
void proc(Prof::Struct::Proc *proc)
static const SrcFile::ln UnknownLine
void setScopeLocation(std::string &file, SrcFile::ln line)
ACodeNode(ANodeTy ty, ANode *parent=NULL, SrcFile::ln begLn=ln_NULL, SrcFile::ln endLn=ln_NULL, VMA begVMA=0, VMA endVMA=0)
std::string m_scope_filenm
Proc(const char *name, ACodeNode *parent, const char *linkname, bool hasSym, SrcFile::ln begLn=ln_NULL, SrcFile::ln endLn=ln_NULL)