- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
It seems that vtl fails for any threaded application I run.
I think it is exiting the main thread after the first call to create_thread.
Here is an example:
#include
#include
#include
void * worker (void *arg)
{
printf("in thread ");
return NULL;
}
int main (int argc, char *argv[])
{
int i;
for (i=0; i<2; i++)
{
pthread_t thr;
printf("before ");
pthread_create (&thr, 0, worker, NULL) ;
printf("after ");
}
sleep(3);
exit (0);
}
compiled with:
g++ -Wall -fPIC -D_REENTRANT -D_PTHREADS -D_POSIX_PTHREADS_SEMANTICS -O2 -o play ./play.cpp -Wl,-Bdynamic -lpthread
Works as expected running normally:
>./play
before
after
before
in thread
after
in thread
but fails under vtl:
>vtl activity -c callgraph -app ./play -moi ./play
>vtl run
VTune Performance Analyzer 1.1 for Linux*
Copyright (C) 2000-2003 Intel Corporation. All rights reserved.
The Activity is running.
Reading property files failed.
Sat Jun 21 14:52:30 2003 Static instrumentation started
Sat Jun 21 14:52:30 2003 All functions instrumentation of module play was successful.
Sat Jun 21 14:52:31 2003 None instrumentation of module ld-linux.so.2 was skipped.
Sat Jun 21 14:52:35 2003 All functions instrumentation of module libc.so.6 was successful.
Sat Jun 21 14:52:36 2003 All functions instrumentation of module libm.so.6 was successful.
Sat Jun 21 14:52:36 2003 All functions instrumentation of module libpthread.so.0 was successful.
Sat Jun 21 14:52:36 2003 Static instrumentation done
before
in thread
Sat Jun 21 14:52:38 2003 Data collection started...
Sat Jun 21 14:52:43 2003 Data collection finished...
Sat Jun 21 14:52:43 2003 Updating call graph database...
The Activity has finished running.
Any suggestions?
I think it is exiting the main thread after the first call to create_thread.
Here is an example:
#include
#include
#include
void * worker (void *arg)
{
printf("in thread ");
return NULL;
}
int main (int argc, char *argv[])
{
int i;
for (i=0; i<2; i++)
{
pthread_t thr;
printf("before ");
pthread_create (&thr, 0, worker, NULL) ;
printf("after ");
}
sleep(3);
exit (0);
}
compiled with:
g++ -Wall -fPIC -D_REENTRANT -D_PTHREADS -D_POSIX_PTHREADS_SEMANTICS -O2 -o play ./play.cpp -Wl,-Bdynamic -lpthread
Works as expected running normally:
>./play
before
after
before
in thread
after
in thread
but fails under vtl:
>vtl activity -c callgraph -app ./play -moi ./play
>vtl run
VTune Performance Analyzer 1.1 for Linux*
Copyright (C) 2000-2003 Intel Corporation. All rights reserved.
The Activity is running.
Reading property files failed.
Sat Jun 21 14:52:30 2003 Static instrumentation started
Sat Jun 21 14:52:30 2003 All functions instrumentation of module play was successful.
Sat Jun 21 14:52:31 2003 None instrumentation of module ld-linux.so.2 was skipped.
Sat Jun 21 14:52:35 2003 All functions instrumentation of module libc.so.6 was successful.
Sat Jun 21 14:52:36 2003 All functions instrumentation of module libm.so.6 was successful.
Sat Jun 21 14:52:36 2003 All functions instrumentation of module libpthread.so.0 was successful.
Sat Jun 21 14:52:36 2003 Static instrumentation done
before
in thread
Sat Jun 21 14:52:38 2003 Data collection started...
Sat Jun 21 14:52:43 2003 Data collection finished...
Sat Jun 21 14:52:43 2003 Updating call graph database...
The Activity has finished running.
Any suggestions?
Link Copied
4 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hey mathewmills,
Just in case this is a new installation: can you get successful run just on something trivial, like /bin/ls, or other test apps on your system?
Just for comparison, have you tried for something as simple as:
# vtl activity -c callgraph -app /bin/ls -moi /bin/ls run
Just in case this is a new installation: can you get successful run just on something trivial, like /bin/ls, or other test apps on your system?
Just for comparison, have you tried for something as simple as:
# vtl activity -c callgraph -app /bin/ls -moi /bin/ls run
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Yes, I have profiled a few non-threaded apps without much trouble.
>vtl activity -c callgraph -app /bin/ls -moi /bin/ls run
>vtl view -calls
runs without trouble and provides the expected data
FYI, my test system is a 6-way PIII w/ 4GB RAM running RedHat 7.2 with 2.4.18-14smp and glibc 2.2.4.
Is there a particular set of sysv ipc settings required?
>vtl activity -c callgraph -app /bin/ls -moi /bin/ls run
>vtl view -calls
runs without trouble and provides the expected data
FYI, my test system is a 6-way PIII w/ 4GB RAM running RedHat 7.2 with 2.4.18-14smp and glibc 2.2.4.
Is there a particular set of sysv ipc settings required?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
After clearing the Cache directory, my simple play program and other threaded programs are profiling fine.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Excellent detective work, mathewmills.
By chance, before clearing that directory, did you happen to notice how full that particular filesystem was? I only ask because if it was quite full, it may fill up again soon, no doubt at a very unexpected and bad time...
By chance, before clearing that directory, did you happen to notice how full that particular filesystem was? I only ask because if it was quite full, it may fill up again soon, no doubt at a very unexpected and bad time...
![](/skins/images/7B0AB6865064EAE32B30EC9A4E94B48A/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page