Closed Bug 1143860 Opened 11 years ago Closed 11 years ago

Deduplicate tracked optimizations in JSON

Categories

(Core :: Gecko Profiler, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla39
Tracking Status
firefox39 --- fixed

People

(Reporter: shu, Unassigned)

References

Details

Attachments

(2 files)

Right now, tracked optimizations are streamed as part of the frame they're attached to. This results in a lot of duplicates and a big JSON for JS-heavy programs (tried on octane). They should be deduplicated.
Attachment #8578251 - Flags: review?(kvijayan)
Blocks: jit-view
Attachment #8578251 - Flags: review?(kvijayan) → review+
Comment on attachment 8578253 [details] [diff] [review] Deduplicate tracked optimizations when streaming the profile. Review of attachment 8578253 [details] [diff] [review]: ----------------------------------------------------------------- ::: tools/profiler/ProfileEntry.h @@ +90,5 @@ > + bool operator<(const OptimizationKey& other) const; > + }; > + > + mozilla::Vector<OptimizationKey> mOpts; > + std::map<OptimizationKey, unsigned> mOptToIndexMap; unordered_map (formerly hash_map) might be a better option here since we don't really care about ordering, just using the map to implement a cache.
Attachment #8578253 - Flags: review?(kvijayan) → review+
(In reply to Kannan Vijayan [:djvj] from comment #3) > Comment on attachment 8578253 [details] [diff] [review] > Deduplicate tracked optimizations when streaming the profile. > > Review of attachment 8578253 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: tools/profiler/ProfileEntry.h > @@ +90,5 @@ > > + bool operator<(const OptimizationKey& other) const; > > + }; > > + > > + mozilla::Vector<OptimizationKey> mOpts; > > + std::map<OptimizationKey, unsigned> mOptToIndexMap; > > unordered_map (formerly hash_map) might be a better option here since we > don't really care about ordering, just using the map to implement a cache. I was told unordered_map isn't in enough places yet for us to use it.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla39
Depends on: 1148069
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: