HPCToolkit
Metric-ADesc.hpp
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 // [The purpose of this file]
54 //
55 // Description:
56 // [The set of functions, macros, etc. defined in the file]
57 //
58 //***************************************************************************
59 
60 #ifndef prof_MetricDesc
61 #define prof_MetricDesc
62 
63 //************************* System Include Files ****************************//
64 
65 #include <iostream>
66 #include <vector>
67 
68 //*************************** User Include Files ****************************//
69 
70 #include <include/uint.h>
71 
72 #include "Metric-AExpr.hpp"
73 #include "Metric-AExprIncr.hpp"
74 
76 
78 
79 //*************************** Forward Declarations **************************//
80 
81 namespace Prof {
82 
83 namespace Metric {
84 
85 /*
86  * type of sampling: period, frequency
87  */
88 typedef enum SamplingType_e {
91 
92 
93 //***************************************************************************//
94 // ADesc
95 //***************************************************************************//
96 
97 class ADesc
98 {
99 public:
100  static const uint id_NULL = UINT_MAX;
101 
102 public:
104  : m_id(id_NULL), m_type(TyNULL), m_partner(NULL),
105  m_isVisible(true), m_isSortKey(false),
106  m_doDispPercent(true), m_isPercent(false),
108  m_dbId(id_NULL), m_dbNumMetrics(0),
109  m_num_samples(0), m_isMultiplexed(false),
111  { }
112 
113  ADesc(const char* nameBase, const char* description,
114  bool isVisible = true, bool isSortKey = false,
115  bool doDispPercent = true, bool isPercent = false)
116  : m_id(id_NULL), m_type(TyNULL), m_partner(NULL),
117  m_description((description) ? description : ""),
121  m_dbId(id_NULL), m_dbNumMetrics(0),
122  m_num_samples(0), m_isMultiplexed(false),
124  {
125  std::string nm = (nameBase) ? nameBase : "";
126  nameFromString(nm);
127  }
128 
129  ADesc(const std::string& nameBase, const std::string& description,
130  bool isVisible = true, bool isSortKey = false,
131  bool doDispPercent = true, bool isPercent = false)
132  : m_id(id_NULL), m_type(TyNULL), m_partner(NULL),
133  m_description(description),
137  m_dbId(id_NULL), m_dbNumMetrics(0),
138  m_num_samples(0), m_isMultiplexed(false),
140  {
141  nameFromString(nameBase);
142  }
143 
144  virtual ~ADesc()
145  { }
146 
147  ADesc(const ADesc& x)
148  : m_id(x.m_id), m_type(x.m_type), m_partner(x.m_partner),
157  { }
158 
159  ADesc&
160  operator=(const ADesc& x)
161  {
162  if (this != &x) {
163  m_id = x.m_id;
164  m_type = x.m_type;
165  m_partner = x.m_partner;
167  m_namePfx = x.m_namePfx;
168  m_nameSfx = x.m_nameSfx;
175  m_dbId = x.m_dbId;
177 
182  }
183  return *this;
184  }
185 
186  virtual ADesc*
187  clone() const
188  { return new ADesc(*this); }
189 
190 
191  // -------------------------------------------------------
192  // id:
193  // -------------------------------------------------------
194 
195  uint
196  id() const
197  { return m_id; }
198 
199  void
200  id(uint id)
201  { m_id = id; }
202 
203 
204  // -------------------------------------------------------
205  // type:
206  // -------------------------------------------------------
207 
208  enum ADescTy {
209  TyNULL = 0,
212  };
213 
214 
215  static const std::string s_nameNULL;
216  static const std::string s_nameIncl;
217  static const std::string s_nameExcl;
218 
219  static const std::string&
221 
222  static const char*
224 
225  static ADescTy
226  stringToADescTy(const std::string& x);
227 
228 
229  ADescTy
230  type() const
231  { return m_type; }
232 
233  void
235  { m_type = type; }
236 
237 
238  // -------------------------------------------------------
239  // partner: inclusive/exclusive metrics come in pairs
240  // -------------------------------------------------------
241 
242  ADesc*
243  partner() const
244  { return m_partner; }
245 
246  void
248  { m_partner = partner; }
249 
250 
251  // -------------------------------------------------------
252  // name: <prefix> <base> <suffix>
253  // -------------------------------------------------------
254 
255  static const char nameSep = '.';
256 
257  static const std::string s_nameFmtTag;
258  static const char s_nameFmtSegBeg = '{'; // shouldn't need to escape
259  static const char s_nameFmtSegEnd = '}';
260 
261 
262  std::string
263  name() const
264  {
265  // acceptable to create on demand
266  std::string nm = namePfxBaseSfx();
267  nm += ADescTyToString(type());
268  return nm;
269  }
270 
271 
272  // nameGeneric: a 'generic' name for the metric (i.e., without the
273  // suffix qualifier)
274  std::string
275  nameGeneric() const
276  {
277  std::string nm = namePfxBase();
278  nm += ADescTyToString(type());
279  return nm;
280  }
281 
282  std::string
283  namePfxBase() const
284  {
285  // acceptable to create on demand
286  std::string nm;
287  if (!m_namePfx.empty()) { nm += m_namePfx + nameSep; }
288  nm += m_nameBase;
289  return nm;
290  }
291 
292  std::string
294  {
295  // acceptable to create on demand
296  std::string nm = namePfxBase();
297  if (!m_nameSfx.empty()) { nm += nameSep + m_nameSfx; }
298  return nm;
299  }
300 
301 
302  // nameToFmt: generate formatted string
303  std::string
304  nameToFmt() const;
305 
306  // nameFromString: if 'x' is a formatted string, set the various name
307  // components; otherwise set base = x.
308  void
309  nameFromString(const std::string& x);
310 
311 
312  const std::string&
313  nameBase() const
314  { return m_nameBase; }
315 
316  void
317  nameBase(const char* x)
318  { m_nameBase = (x) ? x : ""; }
319 
320  void
321  nameBase(const std::string& x)
322  { m_nameBase = x; }
323 
324 
325  const std::string&
326  namePfx() const
327  { return m_namePfx; }
328 
329  void
330  namePfx(const char* x)
331  { m_namePfx = (x) ? x : ""; }
332 
333  void
334  namePfx(const std::string& x)
335  { m_namePfx = x; }
336 
337 
338  const std::string&
339  nameSfx() const
340  { return m_nameSfx; }
341 
342  void
343  nameSfx(const char* x)
344  { m_nameSfx = (x) ? x : ""; }
345 
346  void
347  nameSfx(const std::string& x)
348  { m_nameSfx = x; }
349 
350  // -------------------------------------------------------
351  // description:
352  // -------------------------------------------------------
353 
354  const std::string&
355  description() const
356  { return m_description; }
357 
358  void
359  description(const char* x)
360  { m_description = (x) ? x : ""; }
361 
362  void
363  description(const std::string& x)
364  { m_description = x; }
365 
366 
367  // ------------------------------------------------------------
368  // useful attributes
369  // ------------------------------------------------------------
370 
371  // isVisible
372  bool
373  isVisible() const
374  { return m_isVisible; }
375 
376  void
377  isVisible(bool x)
378  { m_isVisible = x; }
379 
380 
381  bool
382  isSortKey() const
383  { return m_isSortKey; }
384 
385  void
386  isSortKey(bool x)
387  { m_isSortKey = x; }
388 
389 
390  // display as a percentage
391  bool
393  { return m_doDispPercent; }
394 
395  void
397  { m_doDispPercent = x; }
398 
399 
400  // Metric values should be interpreted as percents. This is
401  // important only if the value is to converted to be displayed as a
402  // percent. It is usually only relavent for derived metrics.
403  //
404  // Note: This is a little clumsy. Possibly it should be
405  // incorporated into a "units" attribute. But this will have to do
406  // for now.
407  bool
408  isPercent() const
409  { return m_isPercent; }
410 
411 
412  // ------------------------------------------------------------
413  // computed type
414  // ------------------------------------------------------------
415 
416  enum ComputedTy {
417  ComputedTy_NULL = 0, // no aggregegation from leaves to interior nodes
418  ComputedTy_NonFinal, // non-finalized values
419  ComputedTy_Final // finalized values
420  };
421 
422  ComputedTy
423  computedType() const
424  { return m_computedTy; }
425 
426  void
428  { m_computedTy = x; }
429 
430 
431  // -------------------------------------------------------
432  // metric DB info
433  // -------------------------------------------------------
434 
435  bool
436  hasDBInfo() const
437  { return (m_dbId != id_NULL && m_dbNumMetrics > 0); }
438 
439  void
441  {
442  dbId(id_NULL);
443  dbNumMetrics(0);
444  }
445 
446 
447  const std::string
448  dbFileGlob() const
449  {
450  std::string dbFileGlob;
451  if (!m_namePfx.empty()) { dbFileGlob += m_namePfx + nameSep; }
452  dbFileGlob += std::string("*.") + HPCPROF_MetricDBSfx;
453  return dbFileGlob;
454  }
455 
456 
457  uint
458  dbId() const
459  { return m_dbId; }
460 
461  void
463  { m_dbId = x; }
464 
465 
466  uint
467  dbNumMetrics() const
468  { return m_dbNumMetrics; }
469 
470  void
472  { m_dbNumMetrics = x; }
473 
474 
475  // -------------------------------------------------------
476  //
477  // -------------------------------------------------------
478 
479  virtual std::string
480  toString() const;
481 
482  virtual std::string
484  { DIAG_Die(DIAG_Unimplemented); return ""; }
485 
486  std::ostream&
487  dump(std::ostream& os = std::cerr) const
488  {
489  dumpMe(os);
490  return os;
491  }
492 
493  virtual std::ostream&
494  dumpMe(std::ostream& os = std::cerr) const;
495 
496  void
497  ddump() const;
498 
499 
500  // -------------------------------------------------------
501  //
502  // -------------------------------------------------------
503 
504  static MetricFlags_ValTy_t
506 
507  static ADescTy
509 
510  // -------------------------------------------------------
511  // perf-event additional info
512  // -------------------------------------------------------
513 
514  void
515  isMultiplexed(bool isMultiplexedEvent)
516  { m_isMultiplexed = isMultiplexedEvent; }
517 
518  bool
520  { return m_isMultiplexed; }
521 
522  void
523  periodMean(float periodMeanEvent)
524  { m_period_mean = periodMeanEvent; }
525 
526  float
527  periodMean() const
528  {return m_period_mean; }
529 
530  void
531  sampling_type(SamplingType_t type)
532  { m_sampling_type = type; }
533 
534  SamplingType_t
536  { return m_sampling_type; }
537 
538  void
539  num_samples(const uint64_t samples)
540  { m_num_samples = samples; }
541 
542  uint64_t
543  num_samples() const
544  { return m_num_samples; }
545 
546 protected:
547 private:
551 
553 
554  std::string m_description;
555 
560 
562 
565 
566  // perf event additional attributes
567  uint64_t m_num_samples;
571 };
572 
573 
574 //***************************************************************************//
575 // ADescVec
576 //***************************************************************************//
577 
578 typedef std::vector<ADesc*> ADescVec;
579 
580 //class ADescVec : public std::vector<ADesc*> { };
581 
582 
583 //***************************************************************************//
584 // SampledDesc
585 //***************************************************************************//
586 
587 class SampledDesc : public ADesc
588 {
589 public:
591  : ADesc(),
592  m_period(0), m_flags(hpcrun_metricFlags_NULL), m_isUnitsEvents(false)
593  { }
594 
595  SampledDesc(const char* nameBase, const char* description,
596  uint64_t period, bool isUnitsEvents,
597  const char* profName, const char* profRelId,
598  const char* profType,
599  bool isVisible = true, bool isSortKey = false,
600  bool doDispPercent = true, bool isPercent = false)
601  : ADesc(nameBase, description,
603  m_period(period), m_flags(hpcrun_metricFlags_NULL),
604  m_isUnitsEvents(isUnitsEvents),
605  m_profName(profName), m_profileRelId(profRelId), m_profileType(profType)
606  { }
607 
608  SampledDesc(const std::string& nameBase, const std::string& description,
609  uint64_t period, bool isUnitsEvents,
610  const std::string& profName, const std::string& profRelId,
611  const std::string& profType,
612  bool isVisible = true, bool isSortKey = false,
613  bool doDispPercent = true, bool isPercent = false)
614  : ADesc(nameBase, description,
616  m_period(period), m_flags(hpcrun_metricFlags_NULL),
617  m_isUnitsEvents(isUnitsEvents),
618  m_profName(profName), m_profileRelId(profRelId), m_profileType(profType)
619  { }
620 
621  virtual ~SampledDesc()
622  { }
623 
625  : ADesc(x),
626  m_period(x.m_period), m_flags(x.m_flags),
627  m_isUnitsEvents(x.m_isUnitsEvents),
628  m_profName(x.m_profName), m_profileRelId(x.m_profileRelId),
629  m_profileType(x.m_profileType)
630  { }
631 
632  SampledDesc&
634  {
635  if (this != &x) {
636  ADesc::operator=(x);
637  m_period = x.m_period;
638  m_flags = x.m_flags;
639  m_isUnitsEvents = x.m_isUnitsEvents;
640  m_profName = x.m_profName;
641  m_profileRelId = x.m_profileRelId;
642  m_profileType = x.m_profileType;
643  }
644  return *this;
645  }
646 
647  virtual SampledDesc*
648  clone() const
649  { return new SampledDesc(*this); }
650 
651 
652  // -------------------------------------------------------
653  //
654  // -------------------------------------------------------
655  uint64_t
656  period() const
657  { return m_period; }
658 
659  void
660  period(uint64_t x)
661  { m_period = x; }
662 
663 
665  flags() const
666  { return m_flags; }
667 
668  void
670  { m_flags = x; }
671 
672 
673  // A chinsy way of indicating the metric units of events rather than
674  // samples or something else: FIXME: move to base class
675  bool
677  { return m_isUnitsEvents; }
678 
679  void
680  isUnitsEvents(bool isUnitsEvents)
681  { m_isUnitsEvents = isUnitsEvents; }
682 
683 
684  // ------------------------------------------------------------
685  //
686  // ------------------------------------------------------------
687 
688  // associated profile filename (if available)
689  const std::string&
690  profileName() const
691  { return m_profName; }
692 
693  void
694  profileName(std::string profName)
695  { m_profName = profName; }
696 
697 
698  // -------------------------------------------------------
699  // profile-relative-id: metric id within associated profile file
700  // ('select' attribute in HPCPROF config file)
701  // -------------------------------------------------------
702  const std::string&
703  profileRelId() const
704  { return m_profileRelId; }
705 
706  void
707  profileRelId(std::string profileRelId)
708  { m_profileRelId = profileRelId; }
709 
710 
711  // most likely obsolete: HPCRUN, PROFILE
712  const std::string&
713  profileType() const
714  { return m_profileType; }
715 
716  void
717  profileType(std::string profileType)
718  { m_profileType = profileType; }
719 
720 
721  // -------------------------------------------------------
722  //
723  // -------------------------------------------------------
724 
725  virtual std::string
726  toString() const;
727 
728  virtual std::string
729  toValueTyStringXML() const;
730 
731  virtual std::ostream&
732  dumpMe(std::ostream& os = std::cerr) const;
733 
734 
735 protected:
736 private:
737  uint64_t m_period; // sampling period
738  hpcrun_metricFlags_t m_flags; // flags of the metric
740 
741  std::string m_profName;
742  std::string m_profileRelId;
743  std::string m_profileType;
744 };
745 
746 
747 //***************************************************************************//
748 // SampledDescVec
749 //***************************************************************************//
750 
751 class SampledDescVec : public std::vector<SampledDesc*>
752 {
753 };
754 
755 
756 //***************************************************************************//
757 // DerivedDesc
758 //***************************************************************************//
759 
760 class DerivedDesc : public ADesc
761 {
762 public:
763  // Constructor: assumes ownership of 'expr'
764  DerivedDesc(const char* nameBase, const char* description,
765  Metric::AExpr* expr,
766  bool isVisible = true, bool isSortKey = false,
767  bool doDispPercent = true, bool isPercent = false)
768  : ADesc(nameBase, description,
770  m_expr(expr)
771  { }
772 
773  DerivedDesc(const std::string& nameBase, const std::string& description,
774  Metric::AExpr* expr,
775  bool isVisible = true, bool isSortKey = false,
776  bool doDispPercent = true, bool isPercent = false)
777  : ADesc(nameBase, description,
779  m_expr(expr)
780  { }
781 
782  virtual ~DerivedDesc()
783  { delete m_expr; }
784 
786  : ADesc(x),
787  m_expr(x.m_expr)
788  { DIAG_Die(DIAG_Unimplemented << "must copy expr!"); }
789 
790  DerivedDesc&
792  {
793  if (this != &x) {
794  ADesc::operator=(x);
795  m_expr = x.m_expr;
796  DIAG_Die(DIAG_Unimplemented << "must copy expr!");
797  }
798  return *this;
799  }
800 
801  virtual DerivedDesc*
802  clone() const
803  { return new DerivedDesc(*this); }
804 
805 
806  // -------------------------------------------------------
807  //
808  // -------------------------------------------------------
809 
811  expr() const
812  { return m_expr; }
813 
814  void
816  { m_expr = x; /* assumes ownership of x */ }
817 
818 
819  // -------------------------------------------------------
820  //
821  // -------------------------------------------------------
822 
823  virtual std::string
824  toString() const;
825 
826  virtual std::string
827  toValueTyStringXML() const;
828 
829  virtual std::ostream&
830  dumpMe(std::ostream& os = std::cerr) const;
831 
832 protected:
833 private:
835 };
836 
837 
838 //***************************************************************************//
839 // DerivedIncrDesc
840 //***************************************************************************//
841 
842 class DerivedIncrDesc : public ADesc
843 {
844 public:
845  // Constructor: assumes ownership of 'expr'
846  DerivedIncrDesc(const char* nameBase, const char* description,
847  Metric::AExprIncr* expr,
848  bool isVisible = true, bool isSortKey = false,
849  bool doDispPercent = true, bool isPercent = false)
850  : ADesc(nameBase, description,
852  m_expr(expr)
853  { }
854 
855  DerivedIncrDesc(const std::string& nameBase, const std::string& description,
856  Metric::AExprIncr* expr,
857  bool isVisible = true, bool isSortKey = false,
858  bool doDispPercent = true, bool isPercent = false)
859  : ADesc(nameBase, description,
861  m_expr(expr)
862  { }
863 
865  { delete m_expr; }
866 
868  : ADesc(x),
869  m_expr(x.m_expr)
870  { /* DIAG_Die(DIAG_Unimplemented << "must copy expr!"); */ m_expr = NULL; }
871 
874  {
875  if (this != &x) {
876  ADesc::operator=(x);
877  m_expr = x.m_expr;
878  DIAG_Die(DIAG_Unimplemented << "must copy expr!");
879  }
880  return *this;
881  }
882 
883  virtual DerivedIncrDesc*
884  clone() const
885  { return new DerivedIncrDesc(*this); }
886 
887 
888  // -------------------------------------------------------
889  //
890  // -------------------------------------------------------
891 
892  // N.B.: expr may be NULL if this metric is used as a helper
894  expr() const
895  { return m_expr; }
896 
897  void
899  { m_expr = x; /* assumes ownership of x */ }
900 
901 
902  // -------------------------------------------------------
903  //
904  // -------------------------------------------------------
905 
906  virtual std::string
907  toString() const;
908 
909  virtual std::string
910  toValueTyStringXML() const;
911 
912  virtual std::ostream&
913  dumpMe(std::ostream& os = std::cerr) const;
914 
915 protected:
916 private:
918 };
919 
920 
921 } // namespace Metric
922 
923 } // namespace Prof
924 
925 //***************************************************************************
926 
927 #endif /* prof_ADesc */
const std::string & profileName() const
Metric::AExpr * expr() const
virtual SampledDesc * clone() const
enum SamplingType_e m_sampling_type
void partner(ADesc *partner)
ADesc * partner() const
bool isPercent() const
bool hasDBInfo() const
DerivedIncrDesc(const DerivedIncrDesc &x)
void namePfx(const char *x)
const std::string & nameSfx() const
static ADescTy fromHPCRunMetricValTy(MetricFlags_ValTy_t ty)
std::string namePfxBaseSfx() const
bool isVisible() const
SamplingType_t sampling_type() const
static MetricFlags_ValTy_t toHPCRunMetricValTy(ADescTy ty)
static const uint id_NULL
void isMultiplexed(bool isMultiplexedEvent)
static const char * ADescTyToXMLString(ADescTy type)
virtual std::string toString() const
SampledDesc(const SampledDesc &x)
void nameFromString(const std::string &x)
ADesc(const char *nameBase, const char *description, bool isVisible=true, bool isSortKey=false, bool doDispPercent=true, bool isPercent=false)
const std::string & profileRelId() const
const char * DIAG_Unimplemented
std::vector< ADesc * > ADescVec
static ADescTy stringToADescTy(const std::string &x)
virtual DerivedDesc * clone() const
void namePfx(const std::string &x)
ADesc & operator=(const ADesc &x)
const hpcrun_metricFlags_t hpcrun_metricFlags_NULL
Definition: hpcrun-fmt.c:265
std::string name() const
static const std::string s_nameExcl
SampledDesc(const std::string &nameBase, const std::string &description, uint64_t period, bool isUnitsEvents, const std::string &profName, const std::string &profRelId, const std::string &profType, bool isVisible=true, bool isSortKey=false, bool doDispPercent=true, bool isPercent=false)
bool doDispPercent() const
SampledDesc(const char *nameBase, const char *description, uint64_t period, bool isUnitsEvents, const char *profName, const char *profRelId, const char *profType, bool isVisible=true, bool isSortKey=false, bool doDispPercent=true, bool isPercent=false)
DerivedDesc(const DerivedDesc &x)
void profileType(std::string profileType)
void expr(Metric::AExpr *x)
std::string nameToFmt() const
void nameSfx(const std::string &x)
static const char s_nameFmtSegBeg
void sampling_type(SamplingType_t type)
static const char s_nameFmtSegEnd
void num_samples(const uint64_t samples)
Prof::Metric::AExpr * m_expr
const std::string & nameBase() const
std::string nameGeneric() const
unsigned int uint
Definition: uint.h:124
void description(const std::string &x)
void flags(hpcrun_metricFlags_t x)
virtual std::string toValueTyStringXML() const
void isVisible(bool x)
ComputedTy computedType() const
DerivedIncrDesc(const char *nameBase, const char *description, Metric::AExprIncr *expr, bool isVisible=true, bool isSortKey=false, bool doDispPercent=true, bool isPercent=false)
bool isSortKey() const
SampledDesc & operator=(const SampledDesc &x)
uint dbNumMetrics() const
const std::string dbFileGlob() const
virtual ADesc * clone() const
std::string m_description
void expr(Metric::AExprIncr *x)
void description(const char *x)
ADescTy type() const
std::ostream & dump(std::ostream &os=std::cerr) const
MetricFlags_ValTy_t
Definition: hpcrun-fmt.h:239
std::string m_nameBase
virtual std::ostream & dumpMe(std::ostream &os=std::cerr) const
void doDispPercent(bool x)
DerivedIncrDesc(const std::string &nameBase, const std::string &description, Metric::AExprIncr *expr, bool isVisible=true, bool isSortKey=false, bool doDispPercent=true, bool isPercent=false)
void isSortKey(bool x)
uint64_t num_samples() const
DerivedDesc(const std::string &nameBase, const std::string &description, Metric::AExpr *expr, bool isVisible=true, bool isSortKey=false, bool doDispPercent=true, bool isPercent=false)
static const char nameSep
void computedType(ComputedTy x)
void nameBase(const char *x)
enum Prof::Metric::SamplingType_e SamplingType_t
static const char HPCPROF_MetricDBSfx[]
Definition: hpcrun-fmt.h:102
hpcrun_metricFlags_t m_flags
#define NULL
Definition: ElfHelper.cpp:85
static const std::string s_nameFmtTag
const std::string & namePfx() const
Prof::Metric::AExprIncr * m_expr
void nameBase(const std::string &x)
void isUnitsEvents(bool isUnitsEvents)
const std::string & description() const
static const std::string s_nameIncl
void nameSfx(const char *x)
static const std::string s_nameNULL
const std::string & profileType() const
DerivedDesc(const char *nameBase, const char *description, Metric::AExpr *expr, bool isVisible=true, bool isSortKey=false, bool doDispPercent=true, bool isPercent=false)
hpcrun_metricFlags_t flags() const
float periodMean() const
#define DIAG_Die(...)
Definition: diagnostics.h:267
bool isMultiplexed() const
ADesc(const std::string &nameBase, const std::string &description, bool isVisible=true, bool isSortKey=false, bool doDispPercent=true, bool isPercent=false)
DerivedIncrDesc & operator=(const DerivedIncrDesc &x)
void type(ADescTy type)
void dbNumMetrics(uint x)
static const std::string & ADescTyToString(ADescTy type)
void profileRelId(std::string profileRelId)
virtual DerivedIncrDesc * clone() const
DerivedDesc & operator=(const DerivedDesc &x)
Metric::AExprIncr * expr() const
void periodMean(float periodMeanEvent)
void profileName(std::string profName)
static long period
Definition: itimer.c:194
ADesc(const ADesc &x)
std::string namePfxBase() const