[mercury-users] Using valgrind --tool=cachegrind with Mercury programs

Quan Phan quan.phan at cs.kuleuven.be
Thu Nov 20 21:22:36 AEDT 2008


Hi everybody,

I tried cachegrind on a normal naive reverse program that works on lists of
integers.
When the list is long enough, I got the following segmentation violation
error. If a list has less than ~350 elements it works fine (the GC
warning is still but no seg faults). 
I used rotd 18/11/2008 and the latest valgrind 3.3.1
(but 'valgrind --version' showed 3.2.0-Debian). 
Do you know a way I can try to get around it?

Regards,
Quan.

valgrind --tool=cachegrind ./nrev
==5772== Cachegrind, a cache and branch-prediction profiler.
==5772== Copyright (C) 2002-2007, and GNU GPL'd, by Nicholas Nethercote
et al.
==5772== Using LibVEX rev 1854, a library for dynamic binary
translation.
==5772== Copyright (C) 2004-2007, and GNU GPL'd, by OpenWorks LLP.
==5772== Using valgrind-3.3.1, a dynamic binary instrumentation
framework.
==5772== Copyright (C) 2000-2007, and GNU GPL'd, by Julian Seward et al.
==5772== For more details, rerun with: -v
==5772==
--5772-- warning: Pentium 4 with 12 KB micro-op instruction trace cache
--5772--          Simulating a 16 KB I-cache with 32 B lines
--5772-- DWARF2 CFI reader: unhandled CFI instruction 0:50
--5772-- DWARF2 CFI reader: unhandled CFI instruction 0:50
GC Warning: Too close to address space limit: blacklisting ineffective

*** Mercury runtime: caught segmentation violation ***
PC at signal: 73668433 (4641751)
address involved: 0x1c
This may have been caused by a stack overflow, due to unbounded
recursion.
exiting from signal handler
==5772==
==5772== I   refs:      25,557,038
==5772== I1  misses:         3,567
==5772== L2i misses:         2,062
==5772== I1  miss rate:       0.01%
==5772== L2i miss rate:       0.00%
==5772==
==5772== D   refs:      13,571,679  (6,649,729 rd   + 6,921,950 wr)
==5772== D1  misses:       396,339  (  102,415 rd   +   293,924 wr)
==5772== L2d misses:       349,595  (   60,706 rd   +   288,889 wr)
==5772== D1  miss rate:        2.9% (      1.5%     +       4.2%  )
==5772== L2d miss rate:        2.5% (      0.9%     +       4.1%  )
==5772==
==5772== L2 refs:          399,906  (  105,982 rd   +   293,924 wr)
==5772== L2 misses:        351,657  (   62,768 rd   +   288,889 wr)
==5772== L2 miss rate:         0.8% (      0.1%     +       4.1%  )

--------------------------------------------------------------------------
mercury-users mailing list
Post messages to:       mercury-users at csse.unimelb.edu.au
Administrative Queries: owner-mercury-users at csse.unimelb.edu.au
Subscriptions:          mercury-users-request at csse.unimelb.edu.au
--------------------------------------------------------------------------



More information about the users mailing list