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

No frame samples generated

Chuck_Tuffli
Beginner
469 Views
I'm trying to analyze a latency issue using the Frame API. Using the online documentation, the function of interest has

{
...
__itt_domain *foo_frame = __itt_domain_create("foo");
foo_frame->flags = 1/* enable domain */;
__itt_frame_begin_v3(foo_frame, NULL);
...
__itt_frame_end_v3(foo_frame, NULL);

return(0);
}

But when I view the results in the "Bottom-up" tab and use any Grouping with "Frame xxx", the window displays the message "No data to show".

- the instrumented function does show up in the Function / Call Stack grouping
- objdump of the executable shows all sorts of _itt_* functions
- OS is Ubuntu 10.04.3 LTS
- VTune lists itself as Intel VTune Amplifier XE 2011 (build 186533)
0 Kudos
3 Replies
Peter_W_Intel
Employee
469 Views
It seemed that you missed of calling __itt_frame_create

Please read this article and reference example code.

Regards, peter
0 Kudos
Chuck_Tuffli
Beginner
469 Views
The article you referenced is actually what I used as a starting point, but I couldn't get it to compile*. The next reference I found was the online documentation for the Frame API which did compile. What is the difference between the included documentation and your article?

* The compiler errors are:
error: __itt_frame undeclared (first use in this function)
error: implicit declaration of function __itt_frame_begin
error: implicit declaration of function __itt_frame_end
0 Kudos
Peter_W_Intel
Employee
469 Views

It seems that the article I mentioned in previous reply is for Parallel Studio XE 2011, but now product has been upgraded to Parallel Studio XE 2011 SP1 with new ittnotify APIs.

I just wrote a simplest program here, and show you how it works.
1. Set environment variables: (IA32 for example)
INCLUDE=C:\Program Files (x86)\Intel\VTune Amplifier XE 2011\include
LIB=C:\Program Files (x86)\Intel\VTune Amplifier XE 2011\lib32

2. Open Intel Composer XE 2011 IA-32 Visual Studio 2010, for example

3. Example code matrix.c

#include
#include
#include

#include "ittnotify.h"

#define NUM 512

double a[NUM][NUM], b[NUM][NUM], c[NUM][NUM];


void multiply()
{
unsigned int i,j,k;

__itt_domain *multiply_itt_domain = __itt_domain_create ("multiply");
multiply_itt_domain->flags = 1; //enable it

for(i=0;i __itt_frame_begin_v3 (multiply_itt_domain, NULL);
for(j=0;j c = 0.0;
for(k=0;k c += a*b;
}

}
__itt_frame_end_v3 (multiply_itt_domain, NULL);
}


}


main()
{
clock_t start, stop;

//start timing the matrix multiply code
start = clock();
multiply();
stop = clock();

// print elapsed time
printf("Elapsed time = %lf seconds\n",
((double)(stop - start)) / CLOCKS_PER_SEC);

}


4. Compile example code
C:\temp>icl /Zi matrix.c libittnotify.lib
Intel C++ Compiler XE for applications running on IA-32, Version 12.0.4.196 B
uild 20110427
Copyright (C) 1985-2011 Intel Corporation. All rights reserved.

matrix.c
Microsoft Incremental Linker Version 10.00.30319.01
Copyright (C) Microsoft Corporation. All rights reserved.

-out:matrix.exe
-debug
-pdb:matrix.pdb
matrix.obj
libittnotify.lib

5. Use hotspots analysis and display report below


Regards, Peter

0 Kudos
Reply