|
From: <sv...@va...> - 2006-08-31 19:29:22
|
Author: weidendo
Date: 2006-08-31 20:29:13 +0100 (Thu, 31 Aug 2006)
New Revision: 6043
Log:
callgrind: Fix warning about malformed creator line in annotate script
This also changes the default filename (if not given) to callgrind.out.*
Modified:
trunk/callgrind/callgrind_annotate.in
Modified: trunk/callgrind/callgrind_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/callgrind/callgrind_annotate.in 2006-08-31 11:08:59 UTC (rev 60=
42)
+++ trunk/callgrind/callgrind_annotate.in 2006-08-31 19:29:13 UTC (rev 60=
43)
@@ -100,6 +100,7 @@
my $cmd =3D "";
=20
# Info on the profiled process.
+my $creator =3D "";
my $pid =3D "";
my $part =3D "";
my $thread =3D "";
@@ -310,10 +311,12 @@
}
=20
if ($input_file eq "") {
- $input_file =3D (<cachegrind.out*>)[0];
+ $input_file =3D (<callgrind.out*>)[0];
if (!defined $input_file) {
- $input_file =3D "cachegrind.out";
+ $input_file =3D (<cachegrind.out*>)[0];
}
+
+ (defined $input_file) or die($usage);
print "Reading data from '$input_file'...\n";
}
}
@@ -403,6 +406,7 @@
else { $desc .=3D "$dline\n"; }
}
elsif (/^cmd:\s+(.*)$/) { $cmd =3D $1; }
+ elsif (/^creator:\s+(.*)$/) { $creator =3D $1; }
elsif (/^positions:\s+(.*)$/) {
my $positions =3D $1;
$has_line =3D ($positions =3D~ /line/);
@@ -670,6 +674,11 @@
sub print_options ()
{
print($fancy);
+ print "Profile data file '$input_file'";
+ if ($creator ne "") { print " (creator: $creator)"; }
+ print "\n";
+
+ print($fancy);
print($desc);
my $target =3D $cmd;
if ($pid ne "") {
|
|
From: Julian S. <js...@ac...> - 2006-09-01 02:45:25
|
Should I push this (and/or r6044) into 3.2.1 ?
J
On Thursday 31 August 2006 20:29, sv...@va... wrote:
> Author: weidendo
> Date: 2006-08-31 20:29:13 +0100 (Thu, 31 Aug 2006)
> New Revision: 6043
>
> Log:
> callgrind: Fix warning about malformed creator line in annotate script
>
> This also changes the default filename (if not given) to callgrind.out.*
>
> Modified:
> trunk/callgrind/callgrind_annotate.in
>
>
> Modified: trunk/callgrind/callgrind_annotate.in
> ===================================================================
> --- trunk/callgrind/callgrind_annotate.in 2006-08-31 11:08:59 UTC (rev
> 6042) +++ trunk/callgrind/callgrind_annotate.in 2006-08-31 19:29:13 UTC
> (rev 6043) @@ -100,6 +100,7 @@
> my $cmd = "";
>
> # Info on the profiled process.
> +my $creator = "";
> my $pid = "";
> my $part = "";
> my $thread = "";
> @@ -310,10 +311,12 @@
> }
>
> if ($input_file eq "") {
> - $input_file = (<cachegrind.out*>)[0];
> + $input_file = (<callgrind.out*>)[0];
> if (!defined $input_file) {
> - $input_file = "cachegrind.out";
> + $input_file = (<cachegrind.out*>)[0];
> }
> +
> + (defined $input_file) or die($usage);
> print "Reading data from '$input_file'...\n";
> }
> }
> @@ -403,6 +406,7 @@
> else { $desc .= "$dline\n"; }
> }
> elsif (/^cmd:\s+(.*)$/) { $cmd = $1; }
> + elsif (/^creator:\s+(.*)$/) { $creator = $1; }
> elsif (/^positions:\s+(.*)$/) {
> my $positions = $1;
> $has_line = ($positions =~ /line/);
> @@ -670,6 +674,11 @@
> sub print_options ()
> {
> print($fancy);
> + print "Profile data file '$input_file'";
> + if ($creator ne "") { print " (creator: $creator)"; }
> + print "\n";
> +
> + print($fancy);
> print($desc);
> my $target = $cmd;
> if ($pid ne "") {
>
>
> -------------------------------------------------------------------------
> 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-developers mailing list
> Val...@li...
> https://lists.sourceforge.net/lists/listinfo/valgrind-developers
|
|
From: Josef W. <Jos...@gm...> - 2006-09-06 23:39:02
|
On Friday 01 September 2006 04:45, Julian Seward wrote: > > Should I push this (and/or r6044) into 3.2.1 ? [Just back from few days on holiday] Yes, probably good to have (r6044, too). I would feel more comfortable if a had a regression test for this annotation script; I have further changes in the queue for this script to get a useful "posttest" for callgrind at all. Josef |