|
From: indhu k. s. <ind...@gm...> - 2006-08-02 22:09:38
|
Hi,
I am a graduate student trying to use valgrind for collecting access pattern
for shared libraries when used with TLB.
I am using the tool cachegrind. I have modified the code to include a TLB
simulator and I collect the details about the access pattern for the
instrcutions.
when I give the following command
valgrind --tool=cachegrind --tlb=4,64,1 gedit FAQ.txt
where --tlb is where I give parameters for the TLB (--tlb= <line size>,
<number of entries>, <associativity>)
I am getting more than one process ids in the output. Does valgrind spawn a
new process everytime it calls one of its tools? I know that there is an
execve at the beginning in launcher.c where the tool is called. But is it
happening multiple times?
I have pasted the output that I got.
==13550== Cachegrind, an I1/D1/L2 cache profiler.
==13550== Copyright (C) 2002-2005, and GNU GPL'd, by Nicholas Nethercote et
al.
==13550== Using LibVEX rev 1575, a library for dynamic binary translation.
==13550== Copyright (C) 2004-2005, and GNU GPL'd, by OpenWorks LLP.
==13550== Using valgrind-3.1.1, a dynamic binary instrumentation framework.
==13550== Copyright (C) 2000-2005, and GNU GPL'd, by Julian Seward et al.
==13550== For more details, rerun with: -v
==13550==
--13550-- warning: Pentium 4 with 12 KB micro-op instruction trace cache
--13550-- Simulating a 16 KB I-cache with 32 B lines
==13550== TLB is initialized
4-kB page, 64 lines, direct-mapped
Bonobo accessibility support initialized
GTK Accessibility Module initialized
==14012==
==14012== I refs: 44,306,061
==14012== I1 misses: 143
==14012== L2i misses: 25
==14012== I1 miss rate: 0.00%
==14012== L2i miss rate: 0.00%
==14012==
==14012== D refs: 21,038,484 (15,679,221 rd + 5,359,263 wr)
==14012== D1 misses: 115 ( 80 rd + 35 wr)
==14012== L2d misses: 59 ( 30 rd + 29 wr)
==14012== D1 miss rate: 0.0% ( 0.0% + 0.0% )
==14012== L2d miss rate: 0.0% ( 0.0% + 0.0% )
==14012==
==14012== L2 refs: 258 ( 223 rd + 35 wr)
==14012== L2 misses: 84 ( 55 rd + 29 wr)
==14012== L2 miss rate: 0.0% ( 0.0% + 0.0% )
==14012==
==14012== Number of TLB accesses: 65,344,545
==14012== Number of TLB misses: 1,537,595
==14326==
==14326== I refs: 55,632,758
==14326== I1 misses: 146
==14326== L2i misses: 25
==14326== I1 miss rate: 0.00%
==14326== L2i miss rate: 0.00%
==14326==
==14326== D refs: 26,547,633 (19,613,006 rd + 6,934,627 wr)
==14326== D1 misses: 115 ( 80 rd + 35 wr)
==14326== L2d misses: 59 ( 30 rd + 29 wr)
==14326== D1 miss rate: 0.0% ( 0.0% + 0.0% )
==14326== L2d miss rate: 0.0% ( 0.0% + 0.0% )
==14326==
==14326== L2 refs: 261 ( 226 rd + 35 wr)
==14326== L2 misses: 84 ( 55 rd + 29 wr)
==14326== L2 miss rate: 0.0% ( 0.0% + 0.0% )
==14326==
==14326== Number of TLB accesses: 82,180,391
==14326== Number of TLB misses: 2,056,475
Why are there so many different processes? Also, it takes a really long time
for the gedit to come up. Its been 20 minutes since the execution start.
Can somebody help me with this?
Thanks,
Indhu
|
|
From: Tom H. <to...@co...> - 2006-08-02 23:16:31
|
In message <eea...@ma...>
"indhu krishna sivaramakrishnan" <ind...@gm...> wrote:
> I am getting more than one process ids in the output. Does valgrind spawn a
> new process everytime it calls one of its tools? I know that there is an
> execve at the beginning in launcher.c where the tool is called. But is it
> happening multiple times?
No, valgrind never spawns new processes of it's own accord. Only if
the client program calls fork or clone will you see new processes or
threads appearing.
Tom
--
Tom Hughes (to...@co...)
http://www.compton.nu/
|
|
From: indhu k. s. <ind...@gm...> - 2006-08-03 04:06:41
|
Thank you for the response. My program does not have any fork() calls. Is there any other explanation for this output? Thanks, Indhu On 8/2/06, Tom Hughes <to...@co...> wrote: > > In message <eea...@ma...> > "indhu krishna sivaramakrishnan" <ind...@gm...> wrote: > > > I am getting more than one process ids in the output. Does valgrind > spawn a > > new process everytime it calls one of its tools? I know that there is an > > execve at the beginning in launcher.c where the tool is called. But is > it > > happening multiple times? > > No, valgrind never spawns new processes of it's own accord. Only if > the client program calls fork or clone will you see new processes or > threads appearing. > > Tom > > -- > Tom Hughes (to...@co...) > http://www.compton.nu/ > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys -- and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Valgrind-developers mailing list > Val...@li... > https://lists.sourceforge.net/lists/listinfo/valgrind-developers > |
|
From: Nicholas N. <nj...@cs...> - 2006-08-03 04:11:12
|
On Thu, 3 Aug 2006, indhu krishna sivaramakrishnan wrote: > Thank you for the response. > My program does not have any fork() calls. Is there any other explanation > for this output? It probably does use fork() or clone(), but you just don't realise it because they're buried inside a threading library or something like that. Use 'strace' to watch the system calls your program executes. You'll probably see fork/clone calls in there. Nick |
|
From: John R.
|
> My program does not have any fork() calls. Is there any other explanation > for this output? The glibc subroutines popen() and system() call fork() [+ exec*()]. Some other library used by your program may also use fork(), popen(), or system(), etc. Also consider the possibility that threading may be involved [pthread_create(), etc.], where what is reported as "PID" is actually the thread ID. -- |