Discussion:
[Valgrind-users] callgrind_annotate warnings
Christoph Bartoschek
2006-09-13 09:23:30 UTC
Permalink
Hi,

I currently use the version from trunk because of the fixes to my problems.
Maybe the following problem is caused by my usage of trunk.

Running callgrind_annotate on my result I get such messages:

- Lots of warnings regarding jfi:

WARNING: line 44364 malformed, ignoring
line: 'jfi=(10) array.h'

- Lots of uninitialized values in hash elements

Use of uninitialized value in hash element
at /lfs/user/bartosch/software/vg-test/bin/callgrind_annotate line 597,
<INPUTFILE> line 44463.

- Lots of uninitialized values in concatenation

Use of uninitialized value in concatenation (.) or string
at /lfs/user/bartosch/software/vg-test/bin/callgrind_annotate line 596,
<INPUTFILE> line 51228


The profiled program runs on a amd64 box with valgrind for amd64. When I open
the callgrind.out.pid file with kcachegrind (32bit version) on the amd64 box
the profile is really strange. After the obligatory rearrangement of the
windows one has functions that take more than 100% of the runtime. (see
Loading Image...)

When I open the profile on a i386 machine with suse 10.1 and its kcachegrind
the file seems to look reasonable.

Christoph
Josef Weidendorfer
2006-09-13 11:33:26 UTC
Permalink
Post by Christoph Bartoschek
I currently use the version from trunk because of the fixes to my problems.
Maybe the following problem is caused by my usage of trunk.
Probably not; all the fixes should no also be in the 3.2 branch (to become
3.2.1).
Post by Christoph Bartoschek
WARNING: line 44364 malformed, ignoring
line: 'jfi=(10) array.h'
"jfi" is used when the source file changes in a jump between
jump source and jump target. As callgrind_annotate does not show
jump arrows in its annotation at all, this information is not
needed, so nothing to really worry about.

But of course you are right, callgrind_annotate should not complain about
such lines.
Post by Christoph Bartoschek
- Lots of uninitialized values in hash elements
Use of uninitialized value in hash element
at /lfs/user/bartosch/software/vg-test/bin/callgrind_annotate line 597,
<INPUTFILE> line 44463.
This seems to be about "%all_ind_CCs". Seems to be similar to the code
of cg_annotate.
Post by Christoph Bartoschek
- Lots of uninitialized values in concatenation
Use of uninitialized value in concatenation (.) or string
at /lfs/user/bartosch/software/vg-test/bin/callgrind_annotate line 596,
<INPUTFILE> line 51228
Hmm. That's strange. Both $curr_file and $curr_fn should be defined.
Can you send me the profile data in private?
Post by Christoph Bartoschek
The profiled program runs on a amd64 box with valgrind for amd64. When I open
the callgrind.out.pid file with kcachegrind (32bit version) on the amd64 box
the profile is really strange. After the obligatory rearrangement of the
windows one has functions that take more than 100% of the runtime. (see
http://www.pontohonk.de/example/kcachegrind.png)
There is nothing strange about. This is the reason why cycle detection is
needed; otherwise, you can see >100% cost attributed to calls in recursive
cycles (with cycle detection on, display of inner-cycle-calls gets suppressed
as it is useless).

The reason that cycle detection can be switched off is, that even when KCachegrind
detects a cycle, such inter-cycle call costs still can be useful (e.g. when
the reason for the cycle is only marginal).
Post by Christoph Bartoschek
When I open the profile on a i386 machine with suse 10.1 and its kcachegrind
the file seems to look reasonable.
For the same profile data and "cycle detection" mode in KCachegrind?
That seems strange, and could be a bug in KCachegrind.

Josef
Post by Christoph Bartoschek
Christoph
-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
Valgrind-users mailing list
https://lists.sourceforge.net/lists/listinfo/valgrind-users
--
Dr. Josef Weidendorfer
LRR-TUM (Bode) - Raum 01.06.056 - Tel. +49 / (0)89 / 289 - 18454
Institut für Informatik, Technische Universität München
Josef Weidendorfer
2006-09-13 11:49:05 UTC
Permalink
Post by Christoph Bartoschek
WARNING: line 44364 malformed, ignoring
line: 'jfi=(10) array.h'
Does the following patch help (you can also
apply it to callgrind_annotate directly, without the
".in" suffix).
I just noted that the ignored line also adds an
"ID to filename" mapping, which could be the reason for
subsequent warnings you mentioned.

Josef

===================================================================
--- callgrind_annotate.in (Revision 6052)
+++ callgrind_annotate.in (Arbeitskopie)
@@ -634,6 +634,16 @@
} elsif (s/^(jump|jcnd)=//) {
#ignore jump information

+ } elsif (s/^jfi=(.*)$//) {
+ # side effect needed: possibly add compression mapping
+ uncompressed_name("fl",$1);
+ # ignore jump information
+
+ } elsif (s/^jfn=(.*)$//) {
+ # side effect needed: possibly add compression mapping
+ uncompressed_name("fn",$1);
+ # ignore jump information
+
} elsif (s/^totals:\s+//) {
#ignore

=========================================================
Christoph Bartoschek
2006-09-13 12:01:41 UTC
Permalink
Post by Josef Weidendorfer
Post by Christoph Bartoschek
WARNING: line 44364 malformed, ignoring
line: 'jfi=(10) array.h'
Does the following patch help (you can also
apply it to callgrind_annotate directly, without the
".in" suffix).
I just noted that the ignored line also adds an
"ID to filename" mapping, which could be the reason for
subsequent warnings you mentioned.
Josef
Ok, with this patch there are no warnings.

With cycle detection on, kcachegrind shows reasonable values on both machines.

Now there is only the callgrind_control -i on error left.

Greetings
Christoph

Loading...