HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
UT_PerfMonMemoryEvent.h
Go to the documentation of this file.
1 /*
2  * PROPRIETARY INFORMATION. This software is proprietary to
3  * Side Effects Software Inc., and is not to be reproduced,
4  * transmitted, or disclosed in any way without written permission.
5  *
6  * NAME: UT_PerfMonMemoryEvent.h (UT Library, C++)
7  *
8  * COMMENTS:
9  *
10  * Performance monitor memory event.
11  */
12 
13 #ifndef __UT_PerfMonMemoryEvent__
14 #define __UT_PerfMonMemoryEvent__
15 
16 #include "UT_API.h"
17 
18 #include <SYS/SYS_Time.h>
19 #include "UT_PerfMonEvent.h"
20 #include "UT_PerfMonTypes.h"
21 #include "UT_String.h"
22 #include "UT_Thread.h"
23 #include "UT_ThreadSpecificValue.h"
24 #include "UT_PerfMonUtils.h"
25 
27 {
28 public:
30  int id,
31  const UT_StringHolder &name,
32  const UT_StringHolder &object,
33  bool auto_nest_events,
34  UT_PerfMonCategory category,
35  UT_PerfMonObjectType object_type,
38  int frame_num = UT_PERFORMANCE_INVALID_FRAME);
39  ~UT_PerfMonMemoryEvent() override;
40 
41  /// Format the event into a pretty string that can be outputted in a log.
42  void getFormattedString(
43  UT_PerfMonLogTimeFormat time_format,
44  UT_String &str_event) const override;
45 
46 protected:
47 
48  /// Perform work when the event is started.
49  void subclassStart_() override;
50 
51  /// Perform work when the event is stopped.
52  void subclassStop_() override;
53 
54  /// Calculate the event's self value (time).
55  /// Return the self value.
57 
58  /// Collect the data from the given child event and merge it into this
59  /// event's children data.
61  const UT_PerfMonEvent *child) override;
62 
63 private:
64 
65  /// Pass back a formatted string of this (frame) event.
66  void getFormattedFrameEventString_(
67  UT_String &str_event) const;
68 
69  /// Pass back a formatted string of this (non-frame) event.
70  void getFormattedEventString_(
71  UT_String &str_event) const;
72 
73  size_t myStartMemoryUsage;
74  size_t myStopMemoryUsage;
75  size_t myChildrenMemoryUsage;
76 };
77 
78 #endif
79 
UT_PerfMonLogTimeFormat
virtual void subclassStart_()
Perform work when the event is started.
#define UT_API
Definition: UT_API.h:14
virtual void subclassStop_()
Perform work when the event is stopped.
virtual void subclassCollectDataFromChild_(const UT_PerfMonEvent *child)
UT_PerfMonObjectType
Object types.
static const UT_StringHolder theEmptyString
UT_PerfMonCategory
Categories.
GLuint const GLchar * name
Definition: glcorearb.h:786
virtual void getFormattedString(UT_PerfMonLogTimeFormat time_format, UT_String &str_event) const
Format the event into a pretty string that can be outputted in a log.
fpreal64 fpreal
Definition: SYS_Types.h:277
virtual fpreal subclassCalculateSelfValue_()