Closed
Bug 987297
Opened 11 years ago
Closed 11 years ago
Improve memory usage of profiler by packing ProfileEntry structs together better
Categories
(Core :: Gecko Profiler, defect)
Core
Gecko Profiler
Tracking
()
RESOLVED
FIXED
mozilla31
People
(Reporter: vikstrous, Assigned: vikstrous)
Details
Attachments
(1 file, 1 obsolete file)
730 bytes,
patch
|
Details | Diff | Splinter Review |
As mentioned in bug 962262, we can reduce profiler memory usage significantly (37% on 32 bit and 44% on 64 bit) by not wasting space in the circular buffer of of ProfileEntry structs.
Assignee | ||
Comment 1•11 years ago
|
||
We have 2 ideas to pack the structs better.
1. Use #pragma pack and let the compiler deal with unaligned access
2. Group the structs in groups of 8 so that we combine the char tag names into one 8 byte blob followed by 8 data blobs of 4 or 8 bytes (depending on platform).
Option 1 is *much* simpler to implement.
Comment 2•11 years ago
|
||
Jeff suggest:
3. We can make the ring buffer a binary buffer and do a manual memcpy in and out and have that work in bytes. It's not that hard to implement and it should only require modification to the circular buffer code (read, write) and nothing else outside.
This may be the best way to go rather then fight with #pragma features that may cause a lot of headaches.
Assignee | ||
Updated•11 years ago
|
Assignee: nobody → vstanchev
Assignee | ||
Comment 3•11 years ago
|
||
https://tbpl.mozilla.org/?tree=Try&rev=64dc7862407f
I also tested on B2G on a hamachi and the tags were 9 bytes.
Attachment #8398520 -
Flags: review?(bgirard)
Updated•11 years ago
|
Attachment #8398520 -
Flags: review?(bgirard) → review+
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(bgirard)
Assignee | ||
Comment 4•11 years ago
|
||
Attachment #8398520 -
Attachment is obsolete: true
Assignee | ||
Updated•11 years ago
|
Flags: needinfo?(bgirard)
Keywords: checkin-needed
Comment 5•11 years ago
|
||
Keywords: checkin-needed
Comment 6•11 years ago
|
||
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Comment 7•11 years ago
|
||
The following changeset is now in Firefox Nightly:
> 0219a7db2289 Bug 987297 - Improve memory usage of profiler by packing ProfileEntry structs together better. r=bgirard
Nightly Build Information:
ID: 20140402030201
Changeset: 4941a2ac0786109b08856738019b016a6c5a66a6
Version: 31.0a1
TBPL: https://tbpl.mozilla.org/?rev=4941a2ac0786
URL: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central
Download Links:
> Linux x86: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.linux-i686.tar.bz2
> Linux x86_64: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.linux-x86_64.tar.bz2
> Linux x86_64 ASAN: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.linux-x86_64-asan.tar.bz2
> Mac: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.mac.dmg
> Win32: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.win32.installer.exe
> Win64: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-02-03-02-01-mozilla-central/firefox-31.0a1.en-US.win64-x86_64.installer.exe
Previous Nightly Build Information:
ID: 20140401030203
Changeset: 1417d180a1d8665b1a91b897d1cc4cc31e7980d4
Version: 31.0a1
TBPL: https://tbpl.mozilla.org/?rev=1417d180a1d8
URL: https://ftp.mozilla.org/pub/mozilla.org/firefox/nightly/2014/04/2014-04-01-03-02-03-mozilla-central
You need to log in
before you can comment on or make changes to this bug.
Description
•