Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(364)

Issue 8207001: dump-static-initializers: Add an option to show the size of static initializers, and change insta... (Closed)

Created:
9 years, 2 months ago by Lei Zhang
Modified:
8 years, 9 months ago
CC:
chromium-reviews, pam+watch_chromium.org
Visibility:
Public.

Description

dump-static-initializers: Add an option to show the size of static initializers, and change instances to files. BUG=none TEST=none

Patch Set 1 #

Patch Set 2 : count references in bss section #

Patch Set 3 : add options to show only variables in bss #

Unified diffs Side-by-side diffs Delta from patch set Stats (+48 lines, -18 lines) Patch
M tools/linux/dump-static-initializers.py View 1 2 2 chunks +48 lines, -18 lines 0 comments Download

Messages

Total messages: 8 (0 generated)
Lei Zhang
I thought about this a bit more and I think we want both the # ...
9 years, 2 months ago (2011-10-07 20:30:59 UTC) #1
willchan no longer on Chromium
On Fri, Oct 7, 2011 at 1:30 PM, <thestig@chromium.org> wrote: > Reviewers: willchan, > > ...
9 years, 2 months ago (2011-10-07 20:33:48 UTC) #2
Lei Zhang
I think this does what we want, assuming static initializers are all in the bss ...
9 years, 2 months ago (2011-10-07 23:27:38 UTC) #3
willchan no longer on Chromium
Let me know when you hear back. On Fri, Oct 7, 2011 at 4:27 PM, ...
9 years, 2 months ago (2011-10-09 05:03:08 UTC) #4
Lei Zhang
To summarize the compiler team mailing list email thread: * .bss holds variables whose values ...
9 years, 1 month ago (2011-11-02 21:26:23 UTC) #5
willchan no longer on Chromium
Wow, there's really nothing better than this? Just counting the symbols in .bss seems pretty ...
9 years, 1 month ago (2011-11-03 18:29:17 UTC) #6
Lei Zhang
On 2011/11/03 18:29:17, willchan wrote: > Wow, there's really nothing better than this? Just counting ...
9 years, 1 month ago (2011-11-03 18:47:34 UTC) #7
willchan no longer on Chromium
9 years, 1 month ago (2011-11-05 00:03:21 UTC) #8
Ian Lance Taylor said:
"""
Disassemble the file using objdump -d.  Look for functions whose names
start with _GLOBAL__I.  Within such a function, count the number of call
statements.  If the function ends with a jmp statement, add 1.
"""

I'm also fine with your solution if you want.

On 2011/11/03 18:47:34, Lei Zhang wrote:
> On 2011/11/03 18:29:17, willchan wrote:
> > Wow, there's really nothing better than this? Just counting the symbols in
> .bss
> > seems pretty inaccurate to me =/ I'll go see if I can find a better way, but
> if
> > the compiler team recommended this, then I doubt I'll come up with anything
> > better.
> 
> The compiler team didn't recommend this, nor did they recommend any better
ways
> to do this. I don't know of a better way off the top of my head. Maybe analyze
> the disassembly from objdump to see what's being read and what's being written
> to?
> 
> Note this isn't just counting symbols in .bss, which would indeed be very
> inaccurate. It's counting symbols in .bss that are accessed from .ctor.

Powered by Google App Engine
This is Rietveld 408576698