Closed
Bug 1221844
Opened 9 years ago
Closed 9 years ago
TraceLogger: Move 'TraceLogger_Invalidation' to "LOG_ITEM" (used to be "TREE_ITEM").
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: wuwei, Assigned: wuwei)
References
Details
Attachments
(3 files, 4 obsolete files)
81.96 KB,
image/png
|
Details | |
1.11 KB,
patch
|
Details | Diff | Splinter Review | |
1.39 KB,
patch
|
Details | Diff | Splinter Review |
'TraceLogger_Invalidation' is belong to 'TRACELOGGER_TREE_ITEMS'. It would be better to use "AutoTraceLog" instead of timestamp to log 'TraceLogger_Invalidation', otherwise the tracelogger might complain (see attachment).
Comment 2•9 years ago
|
||
Comment on attachment 8683427 [details] [diff] [review] patch Review of attachment 8683427 [details] [diff] [review]: ----------------------------------------------------------------- The 'TRACELOGGER_TREE_ITEMS' are for items where we would like to track the time it took. For Invalidation/Bailouts that is not something we want to track. In that case it is more important to know how many times it has occurred. Your patch indeed solves the issue, by treating Invalidation like a tree_item. Though I would prefer to go the other way and make Invalidation similar to Bailouts. Can you update and move Invalidation to the 'TRACELOGGER_LOG_ITEMS' list? Bonus points if you add some debug checks to make sure the correct type is used for the logTimestamp/start/stop functions.
Attachment #8683427 -
Flags: review?(hv1989)
Assignee | ||
Comment 3•9 years ago
|
||
(In reply to Hannes Verschore [:h4writer] from comment #2) > Comment on attachment 8683427 [details] [diff] [review] > patch > > Review of attachment 8683427 [details] [diff] [review]: > ----------------------------------------------------------------- > > The 'TRACELOGGER_TREE_ITEMS' are for items where we would like to track the > time it took. > For Invalidation/Bailouts that is not something we want to track. In that > case it is more important to know how many times it has occurred. > > Your patch indeed solves the issue, by treating Invalidation like a > tree_item. Though I would prefer to go the other way and > make Invalidation similar to Bailouts. Can you update and move Invalidation > to the 'TRACELOGGER_LOG_ITEMS' list? Sure. :) > Bonus points if you add some debug checks to make sure the correct type is > used for the logTimestamp/start/stop functions. IIUC these checks would be similar with the checks in TLTextIdIsTreeEvent().
Assignee | ||
Updated•9 years ago
|
Assignee: nobody → lazyparser
Status: UNCONFIRMED → NEW
Ever confirmed: true
Assignee | ||
Updated•9 years ago
|
Summary: TraceLogger: Use "AutoTraceLog" instead of timestamp to log 'TraceLogger_Invalidation'. → TraceLogger: Move 'TraceLogger_Invalidation' to "LOG_ITEM" (used to be "TREE_ITEM").
Assignee | ||
Comment 4•9 years ago
|
||
move to LOG_ITEMS. It works.
Attachment #8683427 -
Attachment is obsolete: true
Attachment #8686534 -
Flags: review?(hv1989)
Assignee | ||
Comment 5•9 years ago
|
||
This patch added range checks in TraceLogTimestamp(). For TREE_ITEMS events, There is a function named 'TLTextIdIsTreeEvent(uint32_t)' guarding for them.
Attachment #8686537 -
Flags: review?(hv1989)
Comment 6•9 years ago
|
||
Comment on attachment 8686534 [details] [diff] [review] bug1221844.patch Review of attachment 8686534 [details] [diff] [review]: ----------------------------------------------------------------- Thanks!
Attachment #8686534 -
Flags: review?(hv1989) → review+
Comment 7•9 years ago
|
||
Comment on attachment 8686537 [details] [diff] [review] bug1221844b.patch Review of attachment 8686537 [details] [diff] [review]: ----------------------------------------------------------------- ::: js/src/vm/TraceLogging.h @@ +389,4 @@ > #endif > inline void TraceLogTimestamp(TraceLoggerThread* logger, TraceLoggerTextId textId) { > #ifdef JS_TRACE_LOGGING > + MOZ_ASSERT(textId > TraceLogger_LastTreeItem && textId < TraceLogger_Last); Can you add this in TraceLogger::logTimestamp?
Attachment #8686537 -
Flags: review?(hv1989)
Assignee | ||
Comment 8•9 years ago
|
||
(In reply to Hannes Verschore [:h4writer] from comment #7) > Comment on attachment 8686537 [details] [diff] [review] > bug1221844b.patch > > Review of attachment 8686537 [details] [diff] [review]: > ----------------------------------------------------------------- > > ::: js/src/vm/TraceLogging.h > @@ +389,4 @@ > > #endif > > inline void TraceLogTimestamp(TraceLoggerThread* logger, TraceLoggerTextId textId) { > > #ifdef JS_TRACE_LOGGING > > + MOZ_ASSERT(textId > TraceLogger_LastTreeItem && textId < TraceLogger_Last); > > Can you add this in TraceLogger::logTimestamp? I'm afraid not. Currently the start/stopEvent() are just wrappers for logTimestamp(), adding checks in logTimestamp() will crash start/stopEvent(). TraceLogger::logTimestamp(uint32_t) was renamed to TraceLoggerThread::logTimestamp(uint32_t), which is used by TraceLoggerThread::startEvent(uint32_t id), which accepts TREE_ITEM events. https://dxr.mozilla.org/mozilla-central/source/js/src/vm/TraceLogging.cpp#498
Flags: needinfo?(hv1989)
Comment 9•9 years ago
|
||
(In reply to Wei Wu [:w :wuwei UTC+8] from comment #8) > (In reply to Hannes Verschore [:h4writer] from comment #7) > > Comment on attachment 8686537 [details] [diff] [review] > > bug1221844b.patch > > > > Review of attachment 8686537 [details] [diff] [review]: > > ----------------------------------------------------------------- > > > > ::: js/src/vm/TraceLogging.h > > @@ +389,4 @@ > > > #endif > > > inline void TraceLogTimestamp(TraceLoggerThread* logger, TraceLoggerTextId textId) { > > > #ifdef JS_TRACE_LOGGING > > > + MOZ_ASSERT(textId > TraceLogger_LastTreeItem && textId < TraceLogger_Last); > > > > Can you add this in TraceLogger::logTimestamp? > > I'm afraid not. > Currently the start/stopEvent() are just wrappers for logTimestamp(), adding > checks in logTimestamp() will crash start/stopEvent(). > > TraceLogger::logTimestamp(uint32_t) was renamed to > TraceLoggerThread::logTimestamp(uint32_t), which is used by > TraceLoggerThread::startEvent(uint32_t id), which accepts TREE_ITEM events. > > https://dxr.mozilla.org/mozilla-central/source/js/src/vm/TraceLogging.cpp#498 oh right. Correct. What about creating a protected function "log", which does the internals of logTimestamp and have logTimestamp and startEvent/stopEvent call this protected function "log"?. In that case we can add the checks in logTimestamp...
Flags: needinfo?(hv1989)
Assignee | ||
Comment 10•9 years ago
|
||
(In reply to Hannes Verschore [:h4writer] from comment #9) > oh right. Correct. > What about creating a protected function "log", which does the internals of > logTimestamp and have logTimestamp and startEvent/stopEvent call this > protected function "log"?. In that case we can add the checks in > logTimestamp... updated version. passed octane profile generation. not sure whether Debugger would be affected, ni? instead of r? so is this patch ok?
Attachment #8686537 -
Attachment is obsolete: true
Flags: needinfo?(hv1989)
Comment 11•9 years ago
|
||
Comment on attachment 8688797 [details] [diff] [review] bug1221844b.patch Review of attachment 8688797 [details] [diff] [review]: ----------------------------------------------------------------- Yes indeed. Looks good.
Attachment #8688797 -
Flags: review+
Updated•9 years ago
|
Flags: needinfo?(hv1989)
Assignee | ||
Updated•9 years ago
|
Keywords: checkin-needed
Comment 14•9 years ago
|
||
https://hg.mozilla.org/integration/mozilla-inbound/rev/abb793676e19 https://hg.mozilla.org/integration/mozilla-inbound/rev/c06b198b8167
Keywords: checkin-needed
Comment 15•9 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/abb793676e19 https://hg.mozilla.org/mozilla-central/rev/c06b198b8167
Status: NEW → RESOLVED
Closed: 9 years ago
status-firefox45:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla45
You need to log in
before you can comment on or make changes to this bug.
Description
•