Skip navigation

Profiling a huge beast such as is clearly a stress for any tool – in this case, it blew the callgrind backend for the valgrind analysis framework. Valgrind seems to reserve a fixed amount of virtual mem for the actual program – if that gets exceeded, strange things will happen, in my case, debug symbols for my libs weren’t loaded (and, guess what, a profile with only hex function labels is kind of unhelpful).

What I finally made to work was the following setup:
callgrind-0.10.0 on top of valgrind-3.0.1, with the following two patches:

--- configure~	2005-08-30 03:15:16.000000000 +0200
+++ configure	2005-11-24 14:27:36.000000000 +0100
@@ -3991,7 +3991,7 @@
 	echo "$as_me:$LINENO: result: ok (${host_cpu})" >&5
 echo "${ECHO_T}ok (${host_cpu})" >&6
-        KICKSTART_BASE="0xb0000000"
+        KICKSTART_BASE="0xa0000000"

(this one adds 256MB additional space for the program to be analyzed – thanks to Yuri’s mail)


--- main.c~	2005-10-04 01:28:01.000000000 +0200
+++ main.c	2005-11-24 13:46:13.000000000 +0100
@@ -274,7 +274,7 @@
    if (bb_seen_before) {
        CLG_ASSERT(ii->instr_offset == instr_offset);
        CLG_ASSERT(ii->instr_size == instrLen);
-       CLG_ASSERT(ii->data_size == dataSize);
+       //CLG_ASSERT(ii->data_size == dataSize);
        CLG_ASSERT(ii->cost_offset == *cost_offset);
        CLG_ASSERT(ii->eventset == es);

(which silences an assertion – the error itself apparently did no harm, things went smoothly after that).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: