* avoid unused-var warnings with annotalysis (lcwu)

* make focused stats %'s relative, not absolute (sanjay)


git-svn-id: http://gperftools.googlecode.com/svn/trunk@105 6b5cf1ce-ec42-a296-1ba9-69fdba395a50
This commit is contained in:
csilvers 2011-02-19 00:11:09 +00:00
parent dd3d9d969e
commit c1abbfae80
2 changed files with 11 additions and 9 deletions

View File

@ -387,7 +387,7 @@
#undef ANNOTALYSIS_STATIC_INLINE
#define ANNOTALYSIS_STATIC_INLINE static inline
#undef ANNOTALYSIS_SEMICOLON_OR_EMPTY_BODY
#define ANNOTALYSIS_SEMICOLON_OR_EMPTY_BODY {}
#define ANNOTALYSIS_SEMICOLON_OR_EMPTY_BODY { (void)file; (void)line; }
#endif
#define ANNOTALYSIS_IGNORE_READS_BEGIN __attribute__ ((ignore_reads_begin))
#define ANNOTALYSIS_IGNORE_READS_END __attribute__ ((ignore_reads_end))

View File

@ -636,7 +636,7 @@ sub Main() {
# Print
if (!$main::opt_interactive) {
if ($main::opt_disasm) {
PrintDisassembly($libs, $flat, $cumulative, $main::opt_disasm, $total);
PrintDisassembly($libs, $flat, $cumulative, $main::opt_disasm);
} elsif ($main::opt_list) {
PrintListing($libs, $flat, $cumulative, $main::opt_list);
} elsif ($main::opt_text) {
@ -646,7 +646,7 @@ sub Main() {
if ($total != 0) {
printf("Total: %s %s\n", Unparse($total), Units());
}
PrintText($symbols, $flat, $cumulative, $total, -1);
PrintText($symbols, $flat, $cumulative, -1);
} elsif ($main::opt_raw) {
PrintSymbolizedProfile($symbols, $profile, $main::prog);
} elsif ($main::opt_callgrind) {
@ -841,7 +841,7 @@ sub InteractiveCommand {
my $flat = FlatProfile($reduced);
my $cumulative = CumulativeProfile($reduced);
PrintText($symbols, $flat, $cumulative, $total, $line_limit);
PrintText($symbols, $flat, $cumulative, $line_limit);
return 1;
}
if (m/^\s*callgrind\s*([^ \n]*)/) {
@ -893,7 +893,7 @@ sub InteractiveCommand {
my $flat = FlatProfile($reduced);
my $cumulative = CumulativeProfile($reduced);
PrintDisassembly($libs, $flat, $cumulative, $routine, $total);
PrintDisassembly($libs, $flat, $cumulative, $routine);
return 1;
}
if (m/^\s*(gv|web|evince)\s*(.*)/) {
@ -1137,9 +1137,10 @@ sub PrintText {
my $symbols = shift;
my $flat = shift;
my $cumulative = shift;
my $total = shift;
my $line_limit = shift;
my $total = TotalProfile($flat);
# Which profile to sort by?
my $s = $main::opt_cum ? $cumulative : $flat;
@ -1214,7 +1215,8 @@ sub PrintDisassembly {
my $flat = shift;
my $cumulative = shift;
my $disasm_opts = shift;
my $total = shift;
my $total = TotalProfile($flat);
foreach my $lib (@{$libs}) {
my $symbol_table = GetProcedureBoundaries($lib->[0], $disasm_opts);
@ -1770,7 +1772,7 @@ sub PrintDot {
if ($f != $c) {
$extra = sprintf("\\rof %s (%s)",
Unparse($c),
Percent($c, $overall_total));
Percent($c, $local_total));
}
my $style = "";
if ($main::opt_heapcheck) {
@ -1789,7 +1791,7 @@ sub PrintDot {
$node{$a},
$sym,
Unparse($f),
Percent($f, $overall_total),
Percent($f, $local_total),
$extra,
$fs,
$style,