Hello, I am entirely new to Valgrind and have just installed it on a Linux Mint system by running "apt-get install valgrind". To get started, I did run cachegrind on a very simple C program, which did nothing more than to add two integer variables. This is the result I got:
==12404== I refs: 101,339 ==12404== I1 misses: 711 ==12404== LLi misses: 704 ==12404== I1 miss rate: 0.70% ==12404== LLi miss rate: 0.69% ==12404== ==12404== D refs: 38,424 (25,653 rd + 12,771 wr) ==12404== D1 misses: 1,696 ( 1,210 rd + 486 wr) ==12404== LLd misses: 1,502 ( 1,043 rd + 459 wr) ==12404== D1 miss rate: 4.4% ( 4.7% + 3.8% ) ==12404== LLd miss rate: 3.9% ( 4.0% + 3.5% ) I was surprised by the relatively large amount of instructions executed, so I did the following: mint ~ $ cat test.c int main() { return 0; } mint ~ $ gcc test.c -o test mint ~ $ valgrind --tool=callgrind ./test ==12430== Callgrind, a call-graph generating cache profiler ==12430== Copyright (C) 2002-2013, and GNU GPL'd, by Josef Weidendorfer et al. ==12430== Using Valgrind-3.10.0.SVN and LibVEX; rerun with -h for copyright info ==12430== Command: ./test ==12430== ==12430== For interactive control, run 'callgrind_control -h'. ==12430== ==12430== Events : Ir ==12430== Collected : 101336 ==12430== ==12430== I refs: 101,336 mint ~ $ callgrind_annotate callgrind.out.12430 -------------------------------------------------------------------------------- Profile data file 'callgrind.out.12430' (creator: callgrind-3.10.0.SVN) -------------------------------------------------------------------------------- I1 cache: D1 cache: LL cache: Timerange: Basic block 0 - 22401 Trigger: Program termination Profiled target: ./test (PID 12430, part 1) Events recorded: Ir Events shown: Ir Event sort order: Ir Thresholds: 99 Include dirs: User annotated: Auto-annotation: off -------------------------------------------------------------------------------- Ir -------------------------------------------------------------------------------- 101,336 PROGRAM TOTALS -------------------------------------------------------------------------------- Ir file:function -------------------------------------------------------------------------------- 21,478 /build/buildd/eglibc-2.19/elf/dl-lookup.c:do_lookup_x [/lib/x86_64-linux-gnu/ld-2.19.so] 17,844 /build/buildd/eglibc-2.19/elf/dl-lookup.c:_dl_lookup_symbol_x [/lib/x86_64-linux-gnu/ld-2.19.so] 16,283 /build/buildd/eglibc-2.19/elf/../sysdeps/x86_64/dl-machine.h:_dl_relocate_object 8,247 /build/buildd/eglibc-2.19/elf/do-rel.h:_dl_relocate_object 8,231 /build/buildd/eglibc-2.19/string/../sysdeps/x86_64/multiarch/../strcmp.S:strcmp'2 [/lib/x86_64-linux-gnu/ld-2.19.so] 4,224 /build/buildd/eglibc-2.19/elf/dl-lookup.c:check_match.9458 [/lib/x86_64-linux-gnu/ld-2.19.so] 2,226 /build/buildd/eglibc-2.19/string/../sysdeps/x86_64/rtld-memset.S:memset [/lib/x86_64-linux-gnu/ld-2.19.so] 1,179 /build/buildd/eglibc-2.19/elf/dl-version.c:_dl_check_map_versions [/lib/x86_64-linux-gnu/ld-2.19.so] 1,169 /build/buildd/eglibc-2.19/string/../sysdeps/x86_64/multiarch/../strcmp.S:strcmp [/lib/x86_64-linux-gnu/ld-2.19.so] 1,147 /build/buildd/eglibc-2.19/elf/dl-load.c:_dl_map_object_from_fd [/lib/x86_64-linux-gnu/ld-2.19.so] 1,058 /build/buildd/eglibc-2.19/elf/dl-deps.c:_dl_map_object_deps [/lib/x86_64-linux-gnu/ld-2.19.so] 1,018 /build/buildd/eglibc-2.19/string/../string/memcmp.c:bcmp [/lib/x86_64-linux-gnu/ld-2.19.so] 1,014 /build/buildd/eglibc-2.19/elf/dl-minimal.c:strsep [/lib/x86_64-linux-gnu/ld-2.19.so] [...] Since none of these functions were called by the program above, I wonder if this how the output is supposed to look. Were are these function calls coming from then? Or could there be something wrong with the way I installed Valgrind? Best regards, Jon ------------------------------------------------------------------------------ One dashboard for servers and applications across Physical-Virtual-Cloud Widest out-of-the-box monitoring support with 50+ applications Performance metrics, stats and reports that give you Actionable Insights Deep dive visibility with transaction tracing using APM Insight. http://ad.doubleclick.net/ddm/clk/290420510;117567292;y _______________________________________________ Valgrind-users mailing list Valgrind-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/valgrind-users