HDK
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros 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_ValArray.h"
22 #include "UT_IntArray.h"
23 #include "UT_String.h"
24 #include "UT_Thread.h"
25 #include "UT_ThreadSpecificValue.h"
26 #include "UT_PerfMonUtils.h"
27 
29 {
30 public:
32  int id, const char *name, const char *object, bool auto_nest_events,
33  UT_PerfMonCategory category, UT_PerfMonObjectType object_type,
34  const char *object_icon=NULL, const char *extra_info=NULL,
35  int frame_num = UT_PERFORMANCE_INVALID_FRAME);
36  virtual ~UT_PerfMonMemoryEvent();
37 
38  /// Format the event into a pretty string that can be outputted in a log.
39  virtual void getFormattedString(
40  UT_PerfMonLogTimeFormat time_format,
41  UT_String &str_event) const;
42 
43 protected:
44 
45  /// Perform work when the event is started.
46  virtual void subclassStart_();
47 
48  /// Perform work when the event is stopped.
49  virtual void subclassStop_();
50 
51  /// Calculate the event's self value (time).
52  /// Return the self value.
54 
55  /// Collect the data from the given child event and merge it into this
56  /// event's children data.
57  virtual void subclassCollectDataFromChild_(
58  const UT_PerfMonEvent *child);
59 
60 private:
61 
62  /// Pass back a formatted string of this (frame) event.
63  void getFormattedFrameEventString_(
64  UT_String &str_event) const;
65 
66  /// Pass back a formatted string of this (non-frame) event.
67  void getFormattedEventString_(
68  UT_String &str_event) const;
69 
70  size_t myStartMemoryUsage;
71  size_t myStopMemoryUsage;
72  size_t myChildrenMemoryUsage;
73 };
74 
75 #endif
76 
UT_PerfMonLogTimeFormat
virtual void subclassStart_()
Perform work when the event is started.
#define UT_API
Definition: UT_API.h:12
virtual void subclassStop_()
Perform work when the event is stopped.
virtual void subclassCollectDataFromChild_(const UT_PerfMonEvent *child)
UT_PerfMonObjectType
Object types.
UT_PerfMonCategory
Categories.
GLuint const GLchar * name
Definition: glcorearb.h:785
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.
double fpreal
Definition: SYS_Types.h:269
virtual fpreal subclassCalculateSelfValue_()