|
From: KillBoy P. <kil...@ya...> - 2009-11-19 02:36:27
|
Hi,
Thanks in advance for any assistance, my situation is as follows:
I'm using valgrind 3.4.1 under Fedora 11, profiling code written in assembly (intel syntax), compiled with nasm 2.05.01 and linked with ld 2.19.51.0.14-1.fc11 20090722.
The valgrind/cachegrind seems to operate fine but when attempting to annotate I get a 'divide by zero' error. No results found via web search for the error meassage so I thought maybe assembly/intel syntax source was not supported but couldn't find anything obvious in the valgrind doco. Here's a sample session output:
######################################################
me@xxxxxx asm$ valgrind --tool=cachegrind --branch-sim=yes ./planned_01 12345
==5827== Cachegrind, a cache and branch-prediction profiler.
==5827== Copyright (C) 2002-2008, and GNU GPL'd, by Nicholas Nethercote et al.
==5827== Using LibVEX rev 1884, a library for dynamic binary translation.
==5827== Copyright (C) 2004-2008, and GNU GPL'd, by OpenWorks LLP.
==5827== Using valgrind-3.4.1, a dynamic binary instrumentation framework.
==5827== Copyright (C) 2000-2008, and GNU GPL'd, by Julian Seward et al.
==5827== For more details, rerun with: -v
==5827==
./planned_01
12346
==5827==
==5827== I refs: 337
==5827== I1 misses: 7
==5827== L2i misses: 7
==5827== I1 miss rate: 2.07%
==5827== L2i miss rate: 2.07%
==5827==
==5827== D refs: 156 (89 rd + 67 wr)
==5827== D1 misses: 7 ( 3 rd + 4 wr)
==5827== L2d misses: 7 ( 3 rd + 4 wr)
==5827== D1 miss rate: 4.4% (3.3% + 5.9% )
==5827== L2d miss rate: 4.4% (3.3% + 5.9% )
==5827==
==5827== L2 refs: 14 (10 rd + 4 wr)
==5827== L2 misses: 14 (10 rd + 4 wr)
==5827== L2 miss rate: 2.8% (2.3% + 5.9% )
==5827==
==5827== Branches: 76 (75 cond + 1 ind)
==5827== Mispredicts: 34 (34 cond + 0 ind)
==5827== Mispred rate: 44.7% (45.3% + 0.0% )
me@xxxxxx asm$ cg_annotate cachegrind.out.5827 planned_01.asm
--------------------------------------------------------------------------------
I1 cache: 32768 B, 64 B, 8-way associative
D1 cache: 32768 B, 64 B, 8-way associative
L2 cache: 2097152 B, 64 B, 8-way associative
Command: ./planned_01 12345
Data file: cachegrind.out.5827
Events recorded: Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw Bc Bcm Bi Bim
Events shown: Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw Bc Bcm Bi Bim
Event sort order: Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw Bc Bcm Bi Bim
Thresholds: 99 0 0 0 0 0 0 0 0 0 0 0 0
Include dirs:
User annotated: planned_01.asm
Auto-annotation: off
--------------------------------------------------------------------------------
Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw Bc Bcm Bi Bim
--------------------------------------------------------------------------------
337 7 7 89 3 3 67 4 4 75 34 0 0 PROGRAM TOTALS
--------------------------------------------------------------------------------
Ir I1mr I2mr Dr D1mr D2mr Dw D1mw D2mw Bc Bcm Bi Bim file:function
--------------------------------------------------------------------------------
Illegal division by zero at /usr/bin/cg_annotate line 620.
me@xxxxxx asm$
######################################################
I took a quick look at cg_annotate and thought possibly there were no functions found ? Happy to post the source if that helps (amateur alert)
thanks
kbp
__________________________________________________________________________________
Win 1 of 4 Sony home entertainment packs thanks to Yahoo!7.
Enter now: http://au.docs.yahoo.com/homepageset/
|