Software Archive
Read-only legacy content
17061 Discussions

Is it possible to view user event in tree style view in amplifier

ccanan
Beginner
521 Views
I wish to write code like, with nested style
__itt_event grandpa = __itt_event_create( "grandpa", 7 );
__itt_event dad = __itt_event_create( "dad", 3 );
__itt_event son = __itt_event_create( "son", 3 );
{
__itt_event_start(grandpa);
//....lots of function calls
{
__itt_event_start(dad);
//....lots of function calls
{
__itt_event_start(son);
__itt_event_end( son);
}
__itt_event_end( dad);
}
__itt_event_end( grandpa);
}
and hope to view the profile result in tree view
+grandpa-----10ms
----+dad------8ms
----son--6ms
----others-2ms
----others---2ms
is it possible to do that, or can u add in the future version?
0 Kudos
3 Replies
Peter_W_Intel
Employee
521 Views
Yes. Please see simple examplebelow -
#include "libittnotify.h" 
__itt_event mark_event = __itt_event_create( "User Mark", 9 );
if( mark_event == __itt_event_err )
return err;
__itt_event frame_event = __itt_event_create( "Frame Completed", 15 );
if( frame_event == __itt_event_err ) return err;
...
int return_value; return_value = __itt_event_start( mark_event );
if( return_value == __itt_err ) report_error();
...
for( int f ; f{
return_value = __itt_event_start( frame_event );
if( return_value == __itt_err )
report_error();













do_stuff_for_frame();
return_value = __itt_event_end( frame_event );
if( return_value == __itt_err )
report_error();
}
return_value = __itt_event_end( mark_event );
if( return_value == __itt_err )
report_error();

Please note that you use users nested events, and observe the results in time line, not in tree view
-Peter



0 Kudos
ccanan
Beginner
521 Views
Hi, thx for the reply.
I did integrate code in your example style, but the result is the user event in timeline is the same color.
I am a game developer, I'll insert more then 30 user events to profile, so in this case, if no tree view, it's a nightmare to check this.
is this(nested user event, and same color in time line with different names) all amplifier can do?
is there any way we can ask for this event view feature added in the future?
0 Kudos
Kirill_R_Intel
Employee
521 Views

Yes, the user events can be seen only in timeline as Peter stated. Currently nested user events are not shown in tree view or different colors. Similar functionality can be added in future releases, maybe in some different API features. Could you please provide your view of the desired functionality in details?We will pass it to development team, so they can take it into account.

0 Kudos
Reply