Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
4975 Discussions

adding user events in Profiler 3.1 ?

noam_cohen
Beginner
442 Views

I tried to add my own start/end events according to the steps described in the help file ("User event API Usage Example").

first, the linker did not find __itt_err and __itt_event_err .(I had to avoid using them)

then, ignoring the return value typedef (after all they are just plain int), I called

__itt_event_create("x", strlen("x")) which returned 0 (zero). subsequent calls also returned 0.

the call to __itt_event_start( my_event) returned 0 (understandable, given the fact that it was 0).

What am I doing wrong?

*looking at the disassembly in debug build, shows an empty function??

using:

Visual Studio 2005

Intel compiler 10.1

ThreadProfiler 3.1

thanks

Noam Cohen

0 Kudos
2 Replies
robert-reed
Valued Contributor II
442 Views
Did you happen to read my blog series on pipelining? One of the posts in that sequenceshows how I used Intel Threading Tools user events to explore the activity of the Intel TBB pipeline and gives code examples. If that doesn't answer your questions, please post a reply here and I'll try to get you a better answer.
0 Kudos
Alexey-Kukanov
Employee
442 Views

Though much time passed since the question, I decided to step in.

It seems that you expected the functions to work in your regular runs, or under a debugger. But they only make sense when you run the application under Thread Profiler. The default implementation of these functions provided by libittnotify.dll contains just empty stubs which return 0. When the application is analyzed with Thread Profiler, the stubs are replaced by real functions from the TP runtime engine. These functions are called and collect the data. In the end, TP will show you purple event marks on the timeline view.

0 Kudos
Reply