|nsTraceRefcnt::DumpStatistics()| write number of entries in the "middle" of the array

RESOLVED FIXED in mozilla1.9.1a2

Status

()

Core
XPCOM
--
minor
RESOLVED FIXED
10 years ago
9 years ago

People

(Reporter: sgautherie, Assigned: sgautherie)

Tracking

({polish})

Trunk
mozilla1.9.1a2
polish
Points:
---
Bug Flags:
in-testsuite -

Firefox Tracking Flags

(Not tracked)

Details

(URL)

Attachments

(2 attachments)

(Assignee)

Description

10 years ago
[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre) Gecko/2008080311 Minefield/3.1a2pre] (home, optim default) (W2Ksp4)

{{
== BloatView: ALL (cumulative) LEAK STATISTICS

     |<----------------Class--------------->|<-----Bytes------>|<----------------Objects---------------->|<--------------References-------------->|
                                              Per-Inst   Leaked    Total      Rem      Mean       StdDev     Total      Rem      Mean       StdDev
   0 TOTAL                                          29     3496   343791      437 (52723,20 +/-     0,00)   950041      437 (28685,04 +/-     0,00)
nsTraceRefcntImpl::DumpStatistics: 202 entries
 154 nsStringBuffer                                  8     3496    16982      437 ( 4816,40 +/-  3264,39)    27495      437 ( 6475,81 +/-  4460,60)
}}

I don't understand why:
*it was added there, instead of before/after the array.
*it uses const |stdout| instead of var |out|.
 *NB: This lines "moves" when |out == stderr| :-(

This code was added by
<http://bonsai.mozilla.org/cvslog.cgi?file=mozilla/xpcom/base/nsTraceRefcntImpl.cpp&mark=1.55#1.57>
(Assignee)

Comment 1

10 years ago
Created attachment 332143 [details] [diff] [review]
(Av1-Bw) <nsTraceRefcntImpl.*>

[Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.9.1a2pre) Gecko/2008080319 Minefield/3.1a2pre] (home, optim default) (W2Ksp4)

Core issue:
*Print the number of entries line after the array lines.
*Print it to |out|.

Related issue:
*Don't print the array header anymore when no leaks/lines to print after it.
 *Reformat a little more the output, wrt blank lines.
*Don't sort++ the entries anymore when none will be printed.
 *Create |count| to optimize a little the array printing.

Unrelated issue:
*Drop (some) useless parameters and return values.
*Rewrite a little some code lines.
*Additional white space cleanup. (see full diff patch)
Assignee: nobody → sgautherie.bz
Status: NEW → ASSIGNED
(Assignee)

Comment 2

10 years ago
Created attachment 332144 [details] [diff] [review]
(Av1) <nsTraceRefcntImpl.*>
[Checkin: Comment 4]

Use Av1-Bw patch to ease review.
Attachment #332144 - Flags: review?(bsmedberg)
(Assignee)

Comment 3

10 years ago
New output looks like (in leaks-only mode)

No leak:
{{

== BloatView: ALL (cumulative) LEAK STATISTICS
nsTraceRefcntImpl::DumpStatistics: 35 entries
}}

Leaks:
{{

== BloatView: ALL (cumulative) LEAK STATISTICS

     |<----------------Class--------------->|<-----Bytes------>|<----------------Objects---------------->|<--------------References-------------->|
                                              Per-Inst   Leaked    Total      Rem      Mean       StdDev     Total      Rem      Mean       StdDev
   0 TOTAL                                          29     3496   343807      437 (52720,82 +/-     0,00)   950273      437 (28678,06 +/-     0,00)
 154 nsStringBuffer                                  8     3496    16998      437 ( 4813,24 +/-  3265,01)    27511      437 ( 6473,07 +/-  4461,20)

nsTraceRefcntImpl::DumpStatistics: 202 entries
}}
Flags: in-testsuite-
Target Milestone: --- → mozilla1.9.1a2
(Assignee)

Updated

10 years ago
Attachment #332144 - Flags: review?(bsmedberg) → review?(benjamin)
(Assignee)

Updated

10 years ago
Attachment #332144 - Flags: superreview?(benjamin)

Updated

10 years ago
Attachment #332144 - Flags: superreview?(benjamin)
Attachment #332144 - Flags: superreview+
Attachment #332144 - Flags: review?(benjamin)
Attachment #332144 - Flags: review+
(Assignee)

Updated

10 years ago
Keywords: checkin-needed
Pushed to mozilla-central:
http://hg.mozilla.org/mozilla-central/index.cgi/rev/70f01c91c562
Status: ASSIGNED → RESOLVED
Last Resolved: 10 years ago
Resolution: --- → FIXED

Updated

10 years ago
Keywords: checkin-needed, polish
(Assignee)

Updated

10 years ago
Attachment #332144 - Attachment description: (Av1) <nsTraceRefcntImpl.*> → (Av1) <nsTraceRefcntImpl.*> [Checkin: Comment 4]
(Assignee)

Updated

10 years ago
Keywords: polish
(Assignee)

Updated

9 years ago
Blocks: 469509
You need to log in before you can comment on or make changes to this bug.