- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
{
...
__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)
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please read this article and reference example code.
Regards, peter
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
* 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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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 512double 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 itfor(i=0;i
__itt_frame_begin_v3 (multiply_itt_domain, NULL);
for(j=0;jc = 0.0;
for(k=0;kc += 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
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page