|
From: <sv...@va...> - 2006-10-21 18:22:44
|
Author: njn
Date: 2006-10-21 19:22:35 +0100 (Sat, 21 Oct 2006)
New Revision: 6330
Log:
- Update comments about Cachegrind file format.
- Be slightly more strict in accepting Cachegrind input files.
Modified:
trunk/cachegrind/cg_annotate.in
Modified: trunk/cachegrind/cg_annotate.in
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
--- trunk/cachegrind/cg_annotate.in 2006-10-20 22:54:20 UTC (rev 6329)
+++ trunk/cachegrind/cg_annotate.in 2006-10-21 18:22:35 UTC (rev 6330)
@@ -36,7 +36,7 @@
# cmd_line ::=3D "cmd:" ws? cmd
# events_line ::=3D "events:" ws? (event ws)+
# data_line ::=3D file_line | fn_line | count_line
-# file_line ::=3D ("fl=3D" | "fi=3D" | "fe=3D") filename
+# file_line ::=3D "fl=3D" filename
# fn_line ::=3D "fn=3D" fn_name
# count_line ::=3D line_num ws? (count ws)+
# summary_line ::=3D "summary:" ws? (count ws)+
@@ -54,8 +54,10 @@
# specific information, eg. for giving the cache configuration for
# cache simulation.
#=20
-# Counts can be "." to represent "N/A", eg. the number of write misses f=
or an
-# instruction that doesn't write to memory.
+# More than one line of info can be presented for each file/fn/line numb=
er.
+# In such cases, the counts for the named events will be accumulated.
+#
+# Counts can be "." to represent zero. This makes the files easier to r=
ead.
#=20
# The number of counts in each 'line' and the 'summary_line' should not =
exceed
# the number of events in the 'event_line'. If the number in each 'line=
' is
@@ -66,13 +68,8 @@
# current filename/fn_name. A 'file_line' and a 'fn_line' must appear
# before any 'count_line's to give the context of the first 'count_line'=
.
#=20
-# Each 'file_line' should be immediately followed by a 'fn_line'. "fi=3D=
"
-# 'file_lines' are used to switch filenames for inlined functions; "fe=3D=
"
-# 'file_lines' are similar, but are put at the end of a basic block in w=
hich
-# the file name hasn't been switched back to the original file name. (f=
i
-# and fe lines behave the same, they are only distinguished to help
-# debugging.) [Nb: "fi=3D" and "fe=3D" have not been produced by Cacheg=
rind for
-# some time, they are no longer necessary.]
+# Each 'file_line' will normally be immediately followed by a 'fn_line'.
+# But it doesn't have to be.
=20
#-----------------------------------------------------------------------=
-----
# Performance improvements record, using cachegrind.out for cacheprof, d=
oing no
@@ -362,14 +359,14 @@
}
=20
# Read "cmd:" line (Nb: will already be in $line from "desc:" loop a=
bove).
- ($line =3D~ s/cmd:\s+//) or die("Line $.: missing command line\n");
+ ($line =3D~ s/^cmd:\s+//) or die("Line $.: missing command line\n");
$cmd =3D $line;
chomp($cmd); # Remove newline
=20
# Read "events:" line. We make a temporary hash in which the Nth ev=
ent's
# value is N, which is useful for handling --show/--sort options bel=
ow.
$line =3D <INPUTFILE>;
- (defined $line && $line =3D~ s/events:\s+//)=20
+ (defined $line && $line =3D~ s/^events:\s+//)=20
or die("Line $.: missing events line\n");
@events =3D split(/\s+/, $line);
my %events;
|