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

No Symbol were found in HotSpot View -- GCC compile options ?

jvong
Beginner
562 Views
I am beginner of VTune. I am using VTune 2.0 for Linux. When I try to view my result with Hotspot View, it always fail to show any function name:
VTune Performance Analyzer 2.0 for Linux*
Copyright (C) 2000-2003 Intel Corporation. All rights reserved.
Event Summary
IA64_INST_RETIRED-THIS
14538 = Samples collected due to this event
900000 = Sample after value used during collection
13084200000 = Total events (samples*SAV)
CPU_CYCLES
8034 = Samples collected due to this event
900000 = Sample after value used during collection
7230600000 = Total events (samples*SAV)
HotSpot View grouped by function (all values in decimal except where indicated)
No symbols were found
I looked into the doc and I followed the following to complie my program with -gdwarf-2 options:
gcc -gdwarf-2 test.c -o test
where test.c is my testing program.
However, nth change and there is still no symbols were found in hotspots.
I am wonder how can I show function in the hotspot view? Does anyone got ideas?
I attach the simple testing program for reference as following:
#include
#include
#define MAX_LOOP 2000
int main(void)
{
int i=0;
void func1();
void func2();
while (i < MAX_LOOP) {
i++;
func1();
func2();
}
}

void func1() {
int a=0;
a++;
}
void func2() {
int a=0;
a++;
}
0 Kudos
5 Replies
David_A_Intel1
Employee
562 Views

You should be able to just use the '-g' option to include debug information. Have you tried that?

Also, what verison of gcc are you using?

Message Edited by dlanders on 04-27-2004 04:17 PM

0 Kudos
jvong
Beginner
562 Views

My gcc version:

[root@SDV900 root]# gcc -v
Reading specs from /usr/lib/gcc-lib/ia64-redhat-linux/2.96/specs
gcc version 2.96 20000731 (Red Hat Linux 7.2 2.96-118.7.2)

I tried to recompile the program with -g like following:

gcc -g test.c -o test

However, I still get the same result.

Do youhave any idea for that?

0 Kudos
David_A_Intel1
Employee
562 Views

Basically, your application isn't doing enough to be noticed. :-} That is, it executes so fast, that the only samples collected in the whole process are in the kernel and runtime library. You can verify this by examining the output of 'vtl view' and noticing that the only modules reported for the application are vmlinux and ld-2.5.5.so, of something similar. So, actually, the analyzer is telling you that there are no samples to be displayed for the module you are specifying.

If you enhance your code to something like:

#include "stdio.h"
#include "string.h"
#define MAX_LOOP 2000
int main(void)
{
int i=0;
void func1();
void func2();
while (i < MAX_LOOP) {
i++;
func1();
func2();
}
}

void func1() {
int i;
char a[10000], b[10000];
for (i=0;i<10000;i++)
{
a = b*2;
}
}
void func2() {
int a=0;
a++;
}

You will see some samples collected in func1() and you can use the hotspot view to examine this.
0 Kudos
gowda
Beginner
562 Views
Hello,
I am also having similar kind of problem, even though
I compile the code with -g option I am not getting the
function profile with hotspot option(-hf).
So I tried the modified code which you posted above,
but still I get the "No symbols were found" message.
Further insights to the problem will be appreciated
Thanks,
Shiv
0 Kudos
David_A_Intel1
Employee
562 Views
Did you check to make sure there were samples in your module? (see previous post)
If so, what version of the gcc compiler are you using and which switches?
0 Kudos
Reply