Closed
Bug 1197636
Opened 9 years ago
Closed 9 years ago
Sample locations are parsed incorrectly if they have quotes.
Categories
(DevTools :: Performance Tools (Profiler/Timeline), defect)
DevTools
Performance Tools (Profiler/Timeline)
Tracking
(firefox43 fixed)
RESOLVED
FIXED
Firefox 43
Tracking | Status | |
---|---|---|
firefox43 | --- | fixed |
People
(Reporter: mbx, Assigned: jsantell)
References
Details
Attachments
(1 file, 1 obsolete file)
(deleted),
patch
|
jsantell
:
review+
|
Details | Diff | Splinter Review |
JS Source:
Native["java/lang/System.arraycopy.(Ljava/lang/Object;ILjava/lang/Object;II)V"] = function () {
...
}
Profiler Sample Location String:
Native["java/lang/System.arraycopy.(Ljava/lang/Object;ILjava/lang/Object;II)V"] (http://localhost:8080/bld/main-all.js:262)
functionName is parsed incorrectly as:
Native["java/lang/System.arraycopy
Assignee | ||
Updated•9 years ago
|
Assignee | ||
Comment 1•9 years ago
|
||
This function is also incorrectly tagged as being chrome code. Huh.
Assignee | ||
Comment 2•9 years ago
|
||
Ughghghghhg.
So this will still fail probably on brackets in query params in the URL or something, but progress.
https://treeherder.mozilla.org/#/jobs?repo=try&revision=7fce94549d29
Attachment #8652105 -
Flags: review?(shu)
Comment 3•9 years ago
|
||
Ugh, well the problem here is that the engine can name functions with parentheses in them. Skipping over brackets isn't the right solution here. Let me think about what to do here...
P.S. The profiler putting the function name and the location in the same string is also super dumb.
Assignee | ||
Comment 4•9 years ago
|
||
It's not a good solution, but it works; what scenario would parentheses exist in a function name outside of square brackets? There is no perfect (or even arguably good) solution for this given the SPS profiler output, but this atleast fixes the function not being labeled as chrome code, and practically speaking don't have more time to give on this
Comment 5•9 years ago
|
||
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #4)
> It's not a good solution, but it works; what scenario would parentheses
> exist in a function name outside of square brackets? There is no perfect (or
> even arguably good) solution for this given the SPS profiler output, but
> this atleast fixes the function not being labeled as chrome code, and
> practically speaking don't have more time to give on this
21:44 < shu> oh maybe it's as simple as the first space from the right
21:44 < shu> if there is a space in the filename, it must be urlencoded
21:45 < shu> wait that doesn't work
21:45 < shu> wait
21:45 < shu> okay that works
21:45 < shu> there are 3 possibilities
21:45 < shu> "name (resource:line)"
21:45 < shu> "resource:line"
21:45 < shu> "resource"
21:46 < shu> for "name (resource:line)", the rightmost space must be the separating space, because spaces in resource
are urlencoded
21:46 < shu> for "resource:line" and "resource", there is no rightmost space, so assume rightmost space = 0
Comment 6•9 years ago
|
||
Attachment #8652105 -
Attachment is obsolete: true
Attachment #8652105 -
Flags: review?(shu)
Updated•9 years ago
|
Attachment #8652660 -
Flags: review?(jsantell)
Assignee | ||
Comment 7•9 years ago
|
||
Comment on attachment 8652660 [details] [diff] [review]
Rework profiler location string parsing to scan from the right.
Review of attachment 8652660 [details] [diff] [review]:
-----------------------------------------------------------------
::: browser/devtools/performance/test/unit/test_frame-utils-01.js
@@ +26,5 @@
> + "hello/<.world (http://localhost:8888/:100:50)",
> +
> + // bug 1197636
> + "Native[\"arraycopy(blah)\"] (http://localhost:8888/profiler.html:4)",
> + "Native[\"java/[lang](blah)\"] (http://localhost:8888/:1)",
This second line was testing specifically extra brackets in the string, due to the implementation of my patch. So if there is any implementation weirdness you can forsee, maybe a test for that, if not remove this
We should add lines here for the 3 types of strings mentioned in frame-utils (not sure if this test already has those or not).
Can any of these profiler strings contain column numbers as well?
Attachment #8652660 -
Flags: review?(jsantell) → review+
Comment 8•9 years ago
|
||
(In reply to Jordan Santell [:jsantell] [@jsantell] from comment #7)
> Comment on attachment 8652660 [details] [diff] [review]
> Rework profiler location string parsing to scan from the right.
>
> Review of attachment 8652660 [details] [diff] [review]:
> -----------------------------------------------------------------
>
> ::: browser/devtools/performance/test/unit/test_frame-utils-01.js
> @@ +26,5 @@
> > + "hello/<.world (http://localhost:8888/:100:50)",
> > +
> > + // bug 1197636
> > + "Native[\"arraycopy(blah)\"] (http://localhost:8888/profiler.html:4)",
> > + "Native[\"java/[lang](blah)\"] (http://localhost:8888/:1)",
>
> This second line was testing specifically extra brackets in the string, due
> to the implementation of my patch. So if there is any implementation
> weirdness you can forsee, maybe a test for that, if not remove this
>
Okay.
> Can any of these profiler strings contain column numbers as well?
Yes.
Assignee | ||
Comment 9•9 years ago
|
||
Then let's add tests for the 3 scenarios mentioned in frame utils if they're not already covered, plus each one with column numbers then looks good to me
Comment 10•9 years ago
|
||
Comment 11•9 years ago
|
||
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox43:
--- → fixed
Flags: in-testsuite+
Resolution: --- → FIXED
Target Milestone: --- → Firefox 43
Updated•6 years ago
|
Product: Firefox → DevTools
You need to log in
before you can comment on or make changes to this bug.
Description
•