Closed
Bug 1224810
Opened 10 years ago
Closed 10 years ago
TraceLogger: Add the script information for the event created by BytecodeCompiler
Categories
(Core :: JavaScript Engine, defect)
Core
JavaScript Engine
Tracking
()
RESOLVED
FIXED
mozilla45
Tracking | Status | |
---|---|---|
firefox45 | --- | fixed |
People
(Reporter: wuwei, Assigned: wuwei)
References
Details
Attachments
(1 file)
3.04 KB,
patch
|
h4writer
:
review+
|
Details | Diff | Splinter Review |
Peeled from bug 1223636.
see bug 1223636 comment #7 for more details.
Assignee | ||
Comment 1•10 years ago
|
||
the previous version is attachment 8685999 [details] [diff] [review].
fixed style-nit (bug 1223636 comment 5).
asking r?h4writer when we come to an agreement on bug 1223636 comment 6.
Flags: needinfo?(lazyparser)
Assignee | ||
Comment 2•10 years ago
|
||
Comment on attachment 8687546 [details] [diff] [review]
bug1224810.patch
talked to h4writer. we're agree on this bug. r?h4writer.
Flags: needinfo?(lazyparser)
Attachment #8687546 -
Flags: review?(hv1989)
Comment 3•10 years ago
|
||
Comment on attachment 8687546 [details] [diff] [review]
bug1224810.patch
Review of attachment 8687546 [details] [diff] [review]:
-----------------------------------------------------------------
Looks good. Two issues with logging non-"script events" with 'script information'
::: js/src/frontend/BytecodeCompiler.cpp
@@ +132,5 @@
> const ReadOnlyCompileOptions& options,
> SourceBufferHolder& sourceBuffer,
> Handle<ScopeObject*> enclosingStaticScope,
> TraceLoggerTextId logId)
> + : traceLogger(cx, logId, options),
This should be 'traceLogger(cx, logId)', since the given logId is not a "script event"
Script events being currently: TraceLogger_Scripts, TraceLogger_AnnotateScripts and TraceLogger_InlinedScripts
https://dxr.mozilla.org/mozilla-central/source/js/src/vm/TraceLogging.cpp#408
@@ +782,5 @@
> .setColumn(lazy->column())
> .setNoScriptRval(false)
> .setSelfHostingMode(false);
>
> + AutoCompilationTraceLogger traceLogger(cx, TraceLogger_ParserCompileLazy, options);
This should be 'AutoCompilationTraceLogger traceLogger(cx, TraceLogger_ParserCompileLazy)', since the TraceLogger_ParserCompileLazy is not a "script event"
Script events being currently: TraceLogger_Scripts, TraceLogger_AnnotateScripts and TraceLogger_InlinedScripts
https://dxr.mozilla.org/mozilla-central/source/js/src/vm/TraceLogging.cpp#408
Can you create a constructor for AutoCompilationTraceLogger that takes no script information (options) to facilitate this?
Attachment #8687546 -
Flags: review?(hv1989)
Assignee | ||
Comment 4•10 years ago
|
||
(In reply to Hannes Verschore [:h4writer] from comment #3)
> Comment on attachment 8687546 [details] [diff] [review]
> bug1224810.patch
>
> Review of attachment 8687546 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Looks good. Two issues with logging non-"script events" with 'script
> information'
>
> ::: js/src/frontend/BytecodeCompiler.cpp
> @@ +132,5 @@
> > const ReadOnlyCompileOptions& options,
> > SourceBufferHolder& sourceBuffer,
> > Handle<ScopeObject*> enclosingStaticScope,
> > TraceLoggerTextId logId)
> > + : traceLogger(cx, logId, options),
>
> This should be 'traceLogger(cx, logId)', since the given logId is not a
> "script event"
> Script events being currently: TraceLogger_Scripts,
> TraceLogger_AnnotateScripts and TraceLogger_InlinedScripts
> https://dxr.mozilla.org/mozilla-central/source/js/src/vm/TraceLogging.cpp#408
>
> @@ +782,5 @@
> > .setColumn(lazy->column())
> > .setNoScriptRval(false)
> > .setSelfHostingMode(false);
> >
> > + AutoCompilationTraceLogger traceLogger(cx, TraceLogger_ParserCompileLazy, options);
>
> This should be 'AutoCompilationTraceLogger traceLogger(cx,
> TraceLogger_ParserCompileLazy)', since the TraceLogger_ParserCompileLazy is
> not a "script event"
> Script events being currently: TraceLogger_Scripts,
> TraceLogger_AnnotateScripts and TraceLogger_InlinedScripts
> https://dxr.mozilla.org/mozilla-central/source/js/src/vm/TraceLogging.cpp#408
>
> Can you create a constructor for AutoCompilationTraceLogger that takes no
> script information (options) to facilitate this?
AutoCompilationTraceLogger creates a TraceLogger_Scripts implicitly, which consumes ReadOnlyCompileOptions. Unfortunately I failed to find another way for creating scripts events w/o passing the options that needed :(
I however have two workarounds:
1. Don't use AutoCompilationTraceLogger. Create scripts event and logger for ParserCompileXXX explicitly. This actually "reverts" the original commit;
2. Create three different AutoCompilationTraceLogger for each ParserCompileXXX events. Sounds not good.
I think I need some more advice here :)
Flags: needinfo?(hv1989)
Comment 5•10 years ago
|
||
Comment on attachment 8687546 [details] [diff] [review]
bug1224810.patch
Review of attachment 8687546 [details] [diff] [review]:
-----------------------------------------------------------------
Ok, my bad. This is totally correct!
Attachment #8687546 -
Flags: review+
Assignee | ||
Comment 6•10 years ago
|
||
(In reply to Hannes Verschore [:h4writer] from comment #5)
> Comment on attachment 8687546 [details] [diff] [review]
> bug1224810.patch
>
> Review of attachment 8687546 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> Ok, my bad. This is totally correct!
np, thanks :)
Flags: needinfo?(hv1989)
Keywords: checkin-needed
Keywords: checkin-needed
Comment 8•10 years ago
|
||
bugherder |
Status: NEW → RESOLVED
Closed: 10 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
•