HPCToolkit
Flat-ProfileData.cpp
Go to the documentation of this file.
1 // -*-Mode: C++;-*-
2 
3 // * BeginRiceCopyright *****************************************************
4 //
5 // $HeadURL$
6 // $Id$
7 //
8 // --------------------------------------------------------------------------
9 // Part of HPCToolkit (hpctoolkit.org)
10 //
11 // Information about sources of support for research and development of
12 // HPCToolkit is at 'hpctoolkit.org' and in 'README.Acknowledgments'.
13 // --------------------------------------------------------------------------
14 //
15 // Copyright ((c)) 2002-2019, Rice University
16 // All rights reserved.
17 //
18 // Redistribution and use in source and binary forms, with or without
19 // modification, are permitted provided that the following conditions are
20 // met:
21 //
22 // * Redistributions of source code must retain the above copyright
23 // notice, this list of conditions and the following disclaimer.
24 //
25 // * Redistributions in binary form must reproduce the above copyright
26 // notice, this list of conditions and the following disclaimer in the
27 // documentation and/or other materials provided with the distribution.
28 //
29 // * Neither the name of Rice University (RICE) nor the names of its
30 // contributors may be used to endorse or promote products derived from
31 // this software without specific prior written permission.
32 //
33 // This software is provided by RICE and contributors "as is" and any
34 // express or implied warranties, including, but not limited to, the
35 // implied warranties of merchantability and fitness for a particular
36 // purpose are disclaimed. In no event shall RICE or contributors be
37 // liable for any direct, indirect, incidental, special, exemplary, or
38 // consequential damages (including, but not limited to, procurement of
39 // substitute goods or services; loss of use, data, or profits; or
40 // business interruption) however caused and on any theory of liability,
41 // whether in contract, strict liability, or tort (including negligence
42 // or otherwise) arising in any way out of the use of this software, even
43 // if advised of the possibility of such damage.
44 //
45 // ******************************************************* EndRiceCopyright *
46 
47 //***************************************************************************
48 //
49 // File:
50 // $HeadURL$
51 //
52 // Purpose:
53 // Class for reading and representing hpcrun profile data.
54 //
55 // Description:
56 // [The set of functions, macros, etc. defined in the file]
57 //
58 // Author:
59 // Written by John Mellor-Crummey and Nathan Tallent, Rice University.
60 //
61 //***************************************************************************
62 
63 //************************* System Include Files ****************************
64 
65 #include <iostream>
66 #include <string>
67 
68 #include <sys/stat.h>
69 
70 #include <cstdio>
71 #include <cstring>
72 
73 //*************************** User Include Files ****************************
74 
75 #include "Flat-ProfileData.hpp"
76 
78 #include <lib/prof-lean/hpcio.h>
79 
81 #include <lib/support/Logic.hpp>
83 #include <lib/support/StrUtil.hpp>
84 
85 //*************************** Forward Declarations **************************
86 
87 //#define PROFREADER_TEST
88 
89 using namespace std;
90 
91 static int
92 read_string(FILE *fp, std::string& str);
93 
94 
95 //***************************************************************************
96 
97 namespace Prof {
98 
99 namespace Flat {
100 
101 
102 ProfileData::ProfileData(const char* filename)
103  : m_name((filename) ? filename : ""), m_fs(NULL)
104 {
105 }
106 
107 
109 {
110  if (m_fs) {
111  fclose(m_fs);
112  }
113 
114  for (const_iterator it = begin(); it != end(); ++it) {
115  const LM* proflm = it->second;
116  delete proflm;
117  }
118  clear();
119 
120  for (Metric::SampledDescVec::iterator it = m_mdescs.begin();
121  it != m_mdescs.end(); ++it) {
122  delete (*it);
123  }
124  m_mdescs.clear();
125 }
126 
127 
128 void
129 ProfileData::openread(const char* filename)
130 {
131  DIAG_Assert(Logic::implies(!m_name.empty() && filename, m_name.c_str() == filename), "Cannot open a different file!");
132  if (m_name.empty() && filename) {
133  m_name = filename;
134  }
135 
136  // Open file
137  m_fs = ProfileData::fopen(m_name.c_str());
138 
139  // Read it
140  read();
141 
142  // Gather metrics
143  iterator it = begin();
144  mdescs(it->second);
145 }
146 
147 
148 void
149 ProfileData::open(const char* filename)
150 {
151  DIAG_Assert(Logic::implies(!m_name.empty() && filename, m_name.c_str() == filename), "Cannot open a different file!");
152  if (m_name.empty() && filename) {
153  m_name = filename;
154  }
155 
156  // Open file
157  m_fs = ProfileData::fopen(m_name.c_str());
158 
159  // Gather metrics
160  read_metrics();
161  fseek(m_fs, 0L, SEEK_SET); // rewind
162 
163  // NOT YET READ
164 }
165 
166 
167 void
169 {
170  // INVARIANT: at least one LM must exist in a profile.
171 
172  DIAG_Assert(m_fs, "No open file stream!");
173 
174  // -------------------------------------------------------
175  // <header>
176  // -------------------------------------------------------
177  read_header(m_fs);
178 
179  // -------------------------------------------------------
180  // <loadmodule_list>
181  // -------------------------------------------------------
182  uint count = read_lm_count(m_fs);
183  DIAG_Assert(count > 0, "At least one LM must exist in a profile!");
184 
185  for (uint i = 0; i < count; ++i) {
186  LM* proflm = new LM();
187  proflm->read(m_fs, m_name.c_str());
188  insert(make_pair(proflm->name(), proflm));
189  }
190 
191  fclose(m_fs);
192  m_fs = NULL;
193 }
194 
195 
196 void
198 {
199  // ASSUMES: Each LM has the *same* set of metrics
200 
201  DIAG_Assert(m_fs, "No open file stream!");
202 
203  // -------------------------------------------------------
204  // <header>
205  // -------------------------------------------------------
206  read_header(m_fs);
207 
208  // -------------------------------------------------------
209  // read one load module
210  // -------------------------------------------------------
211  uint count = read_lm_count(m_fs);
212  DIAG_Assert(count > 0, "At least one LM must exist in a profile!");
213 
214  LM* proflm = new LM();
215  proflm->read(m_fs, m_name.c_str());
216 
217  // -------------------------------------------------------
218  // gather metrics
219  // -------------------------------------------------------
220  mdescs(proflm);
221 
222  delete proflm;
223 }
224 
225 
226 void
228 {
229  // ASSUMES: Each LM has the *same* set of metrics
230 
231  uint sz = proflm->num_events();
232 
233  m_mdescs.resize(sz);
234 
235  for (uint i = 0; i < sz; ++i) {
236  const EventData& profevent = proflm->event(i);
237  m_mdescs[i] = new Metric::SampledDesc(profevent.mdesc());
238  }
239 }
240 
241 
242 FILE*
243 ProfileData::fopen(const char* filename)
244 {
245  struct stat statbuf;
246  int ret = stat(filename, &statbuf);
247  if (ret != 0) {
248  PROFFLAT_Throw("Cannot stat file: '" << filename << "'");
249  }
250 
251  FILE* fs = ::fopen(filename, "r");
252  if (!fs) {
253  PROFFLAT_Throw("Cannot open file: '" << filename << "'");
254  }
255 
256  return fs;
257 }
258 
259 
260 void
262 {
263  char magic_str[HPCRUNFLAT_FMT_MagicLen];
264  char version[HPCRUNFLAT_VersionLen];
265  char endian;
266  int c;
267  size_t sz;
268 
269  sz = fread((char*)magic_str, 1, HPCRUNFLAT_FMT_MagicLen, fs);
270  if (sz != HPCRUNFLAT_FMT_MagicLen) {
271  PROFFLAT_Throw("Error reading <header>.");
272  }
273 
274  sz = fread((char*)version, 1, HPCRUNFLAT_VersionLen, fs);
275  if (sz != HPCRUNFLAT_VersionLen) {
276  PROFFLAT_Throw("Error reading <header>.");
277  }
278 
279  if ((c = fgetc(fs)) == EOF) {
280  PROFFLAT_Throw("Error reading <header>.");
281  }
282  endian = (char)c;
283 
284 
285  // sanity check header
286  if (strncmp(magic_str, HPCRUNFLAT_FMT_Magic,
287  HPCRUNFLAT_FMT_MagicLen) != 0) {
288  PROFFLAT_Throw("Error reading <header>: bad magic string.");
289  }
290  if (strncmp(version, HPCRUNFLAT_Version, HPCRUNFLAT_VersionLen) != 0) {
291  PROFFLAT_Throw("Error reading <header>: bad version.");
292  }
293  if (endian != HPCRUNFLAT_FMT_Endian) {
294  PROFFLAT_Throw("Error reading <header>: bad endianness.");
295  }
296 }
297 
298 
299 uint
301 {
302  uint32_t count;
303 
304  size_t sz = hpcio_le4_fread(&count, fs);
305  if (sz != sizeof(count)) {
306  PROFFLAT_Throw("Error reading <loadmodule_list>.");
307  }
308 
309  return count;
310 }
311 
312 
313 void
314 ProfileData::dump(std::ostream& o, const char* pre) const
315 {
316  string p = pre;
317  string p1 = p + " ";
318 
319  o << p << "--- ProfileData Dump ---" << endl;
320  o << p << "{ ProfileData: " << m_name << " }" << endl;
321 
322  for (const_iterator it = begin(); it != end(); ++it) {
323  const LM* proflm = it->second;
324  proflm->dump(o, p1.c_str());
325  }
326  o << p << "--- End ProfileData Dump ---" << endl;
327 }
328 
329 
330 //***************************************************************************
331 
333 {
334 }
335 
336 
338 {
339 }
340 
341 
342 void
343 LM::read(FILE *fs, const char* filename)
344 {
345  size_t sz;
346 
347  // -------------------------------------------------------
348  // <loadmodule_name>, <loadmodule_loadoffset>
349  // -------------------------------------------------------
350  if (read_string(fs, m_name) != 0) {
351  PROFFLAT_Throw("Error reading <loadmodule_name>.");
352  }
354 
355  sz = hpcio_le8_fread(&m_load_addr, fs);
356  if (sz != sizeof(m_load_addr)) {
357  PROFFLAT_Throw("Error reading <loadmodule_loadoffset>.");
358  }
359 
360  DIAG_Msg(5, "Reading: " << m_name << " loaded at 0x"
361  << hex << m_load_addr << dec);
362 
363  // -------------------------------------------------------
364  // <loadmodule_eventcount>
365  // -------------------------------------------------------
366  uint count = 1;
367  sz = hpcio_le4_fread(&count, fs);
368  if (sz != sizeof(count)) {
369  PROFFLAT_Throw("Error reading <loadmodule_eventcount>.");
370  }
371  m_eventvec.resize(count);
372 
373  // -------------------------------------------------------
374  // Event data
375  // -------------------------------------------------------
376  for (uint i = 0; i < count; ++i) {
377  EventData& edata = m_eventvec[i];
378  edata.read(fs, m_load_addr);
379 
380  Metric::SampledDesc& mdesc = edata.mdesc();
381  if (filename) {
382  mdesc.profileName(filename);
383  }
384  mdesc.profileRelId(StrUtil::toStr(i));
385  mdesc.profileType("HPCRUN");
386  }
387 }
388 
389 
390 void
391 LM::dump(std::ostream& o, const char* pre) const
392 {
393  string p = pre;
394  string p1 = p + " ";
395 
396  o << p << "{ LM: " << m_name << ", loadAddr: 0x" << hex
397  << m_load_addr << dec << " }" << endl;
398 
399  for (uint i = 0; i < num_events(); ++i) {
400  const EventData& profevent = event(i);
401  profevent.dump(o, p1.c_str());
402  }
403 }
404 
405 
406 //***************************************************************************
407 
408 
410 {
411 }
412 
413 
415 {
416 }
417 
418 
419 void
420 EventData::read(FILE *fs, uint64_t load_addr)
421 {
422  size_t sz;
423 
424  std::string name, desc;
425  uint64_t period;
426 
427  // -------------------------------------------------------
428  // <event_x_name> <event_x_description> <event_x_period>
429  // -------------------------------------------------------
430  if (read_string(fs, name) != 0) {
431  PROFFLAT_Throw("Error reading <event_x_name>.");
432  }
433  if (read_string(fs, desc) != 0) {
434  PROFFLAT_Throw("Error reading <event_x_description>.");
435  }
436 
437  sz = hpcio_le8_fread(&period, fs);
438  if (sz != sizeof(period)) {
439  PROFFLAT_Throw("Error reading <event_x_period>.");
440  }
441 
442  m_mdesc.nameBase(name);
443  m_mdesc.description(desc);
444  m_mdesc.period(period);
445  //m_mdesc.flags();
446 
447 
448  // -------------------------------------------------------
449  // <event_x_data>
450  // -------------------------------------------------------
451  m_sparsevec.clear();
452  m_outofrange = 0;
453  m_overflow = 0;
454 
455  // <histogram_non_zero_bucket_count>
456  uint64_t ndat; // number of profile entries
457  sz = hpcio_le8_fread(&ndat, fs);
458  if (sz != sizeof(ndat)) {
459  PROFFLAT_Throw("Error reading <histogram_non_zero_bucket_count>.");
460  }
461  m_sparsevec.resize(ndat);
462 
463  DIAG_Msg(6, " EventData: " << name << ": " << ndat << " entries (cnt,offset)");
464 
465  // <histogram_non_zero_bucket_x_value>
466  // <histogram_non_zero_bucket_x_offset>
467  uint32_t count; // profile count
468  uint64_t offset; // offset from load address
469  for (uint i = 0; i < ndat; ++i) {
470  sz = hpcio_le4_fread(&count, fs); // count
471  if (sz != sizeof(count)) {
472  PROFFLAT_Throw("Error reading <histogram_non_zero_bucket_x_value>.");
473  }
474 
475  sz = hpcio_le8_fread(&offset, fs); // offset
476  if (sz != sizeof(offset)) {
477  PROFFLAT_Throw("Error reading <histogram_non_zero_bucket_x_offset>.");
478  }
479  DIAG_Msg(7, " " << i << ": (" << count << ", " << offset << ")");
480 
481  VMA pc = load_addr + offset;
482  m_sparsevec[i] = make_pair(pc, count);
483  }
484 }
485 
486 
487 void
488 EventData::dump(std::ostream& o, const char* pre) const
489 {
490  string p = pre;
491  string p1 = p + " ";
492 
493  o << p << "{ EventData: " << mdesc().name()
494  << ", period: " << mdesc().period()
495  << ", outofrange: " << outofrange()
496  << ", overflow: " << overflow()
497  << " }" << endl;
498 
499  for (uint i = 0; i < num_data(); ++i) {
500  const Datum& dat = datum(i);
501  o << p1 << "{ 0x" << hex << dat.first << ": " << dec
502  << dat.second << " }" << endl;
503  }
504 }
505 
506 } // namespace Flat
507 
508 } // namespace Prof
509 
510 
511 //***************************************************************************
512 
513 static int
514 read_string(FILE *fs, std::string& str)
515 {
516  size_t sz;
517  uint32_t len; // string length
518  int c;
519 
520  // <string_length> <string_without_terminator>
521  sz = hpcio_le4_fread(&len, fs);
522  if (sz != sizeof(len)) {
523  return 1;
524  }
525 
526  str.resize(len);
527  for (uint n = 0; n < len; ++n) {
528  if ((c = fgetc(fs)) == EOF) {
529  return 1;
530  }
531  str[n] = (char)c;
532  }
533 
534  return 0;
535 }
536 
537 
538 //***************************************************************************
539 
540 #ifdef PROFREADER_TEST
541 
542 int main(int argc, char **argv)
543 {
544  std::string filename = argv[1];
545  ProfileData f;
546 
547  int ret = f.read(filename);
548 
549  if (ret == 0) {
550  cerr << "successfully read file!";
551  }
552  else {
553  cerr << "error reading file!";
554  }
555 
556  cout << "File dump:" << endl;
557  f.dump(cout);
558 }
559 
560 #endif
561 
562 //***************************************************************************
const std::string & profileName() const
const EventData & event(uint i) const
bfd_vma VMA
Definition: ISATypes.hpp:79
string toStr(const int x, int base)
Definition: StrUtil.cpp:243
const Metric::SampledDescVec & mdescs()
const std::string & profileRelId() const
static uint read_lm_count(FILE *fs)
#define HPCRUNFLAT_FMT_Endian
Metric::SampledDescVec m_mdescs
static RealPathMgr & singleton()
void openread(const char *filename=NULL)
size_t hpcio_le8_fread(uint64_t *val, FILE *fs)
Definition: hpcio.c:209
#define HPCRUNFLAT_FMT_Magic
std::pair< VMA, bucketsz_t > Datum
void read(FILE *, const char *filename=NULL)
const std::string & name() const
bool realpath(std::string &pathNm) const
ProfileData(const char *filename=NULL)
unsigned int uint
Definition: uint.h:124
const Metric::SampledDesc & mdesc() const
size_t MONITOR_EXT_WRAP_NAME() fread(void *ptr, size_t size, size_t count, FILE *stream)
Definition: io-over.c:226
int main(int argc, char *argv[])
Definition: main.cpp:125
void dump(std::ostream &o=std::cerr, const char *pre="") const
#define DIAG_Msg(level,...)
Definition: diagnostics.h:241
void read(FILE *, uint64_t load_addr)
uint num_events() const
const std::string & name() const
void dump(std::ostream &o=std::cerr, const char *pre="") const
#define NULL
Definition: ElfHelper.cpp:85
static void read_header(FILE *fs)
size_t hpcio_le4_fread(uint32_t *val, FILE *fs)
Definition: hpcio.c:192
#define HPCRUNFLAT_FMT_MagicLen
#define HPCRUNFLAT_Version
const std::string & profileType() const
void open(const char *filename=NULL)
static int read_string(FILE *fp, std::string &str)
static FILE * fopen(const char *filename)
bool implies(bool p, bool q)
Definition: Logic.hpp:114
<!-- ********************************************************************--> 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
void dump(std::ostream &o=std::cerr, const char *pre="") const
#define PROFFLAT_Throw(streamArgs)
#define HPCRUNFLAT_VersionLen
static long period
Definition: itimer.c:194