Table of Contents
1 - Introduction2 - Profiling your application
1 - Integrating the SDK
2 - Initialising the profiler
3 - Profile events
4 - Block types
3 - User interface reference2 - Initialising the profiler
3 - Profile events
4 - Block types
5 - Event attributes
6 - Defining expressions4 - SDK Reference
Contact Information
Sales
Sales and licensing related questions should be sent to our sales team at:Feedback
If you have feedback regarding this website or any of our products, please use the following email address:Support
Questions related to problems you have encountered with either this website or any of our products should be directed to our support team at:Enquiries
Any other questions, or general enquiries should be sent to the following email address:2.5 - Event attributes
Attributes are a way for applications to add custom data to profile events.Before an application can start adding attribute data to events, the attribute types must first be registered in the profile itself. This is done through calling OsoMP_NewAttribute. It is recommended you do this in your implementation of OsoMP_InitialiseCallback.
Attribute types consist of the following pieces of information:
ID | Application defined unique identifier. Attribute IDs are 8-bit values and must be greater than or equal to ATTRIBUTEID_FirstUser (defined as 20 in the Oso Memory Profiler SDK) and less than or equal to ATTRIBUTEID_Last (255). |
Type |
An attribute type defines the data format of an attribute. Attribute data can be one of the following types:
|
Name |
A friendly name to help identify attributes within the Oso Memory Profiler. An attribute's name is also the basis for its simple name when attributes are referenced in block type format strings or expressions. An attribute's simple name is the lowercase form of its name with all punctuation and spacing removed. For example, the simple name of "Frame Number" is "framenumber". |
The OsoMPAttribute structure is defined as follows:
typedef struct OsoMPAttribute { UInt8 mID; // Application defined unique identifier. OsoMPAttributeType mType; union mData { SInt32 mInt32; // ATTRIBUTETYPE_Integer32, or ATTRIBUTETYPE_Frequency. float mFloat; // ATTRIBUTETYPE_Float. const char* mText; // ATTRIBUTETYPE_String, ATTRIBUTETYPE_Filename, or ATTRIBUTETYPE_URL. SInt64 mInt64; // ATTRIBUTETYPE_Integer64, ATTRIBUTETYPE_Time, or ATTRIBUTETYPE_Duration. } mData; } OsoMPAttribute;
Any attributes that have been added to an event will be listed in the [PAGE=infoattributes'>attributes information pane[/PAGE] for an event.
While custom attributes are a great way to provide additional context to help you understand what your application was doing at any given time, they can also be used to help validate your application's behaviour. More information regarding this can be found on the page explaining expressions.
Attributes can also be used to control grouping of blocks in the Blocks overview pane in the Oso Memory Profiler. See the page on Block Types for more information about this.