Closed Bug 1171654 Opened 9 years ago Closed 9 years ago

Record stacks for pending protocol.js requests when testing

Categories

(DevTools :: Framework, defect)

defect
Not set
normal

Tracking

(firefox42 fixed)

RESOLVED FIXED
Firefox 42
Tracking Status
firefox42 --- fixed

People

(Reporter: jryans, Assigned: jryans)

References

Details

Attachments

(1 file, 1 obsolete file)

Record the pending request stack as a debugging aid during tests.
Assignee: nobody → jryans
Status: NEW → ASSIGNED
For the moment, I plan to move |testing| off gDevTools and onto DevToolsUtils, so that it's available in toolkit.

We can then undo workarounds like bug 1160837 comment 34.
Bug 1171654 - Move testing flag to DevToolsUtils. r=ochameau
Attachment #8620516 - Flags: review?(poirot.alex)
Attachment #8620515 - Attachment description: MozReview Request: Bug 1171654 - Record stacks of pending requests. r=ochameau → MozReview Request: Bug 1171654 - Record stacks of pending requests. r?ochameau
Comment on attachment 8620515 [details]
MozReview Request: Bug 1171654 - Report stacks for pending requests. r=ochameau

Bug 1171654 - Record stacks of pending requests. r?ochameau
Comment on attachment 8620516 [details]
MozReview Request: Bug 1171654 - Move testing flag to DevToolsUtils. r?ochameau

Bug 1171654 - Move testing flag to DevToolsUtils. r?ochameau
Attachment #8620516 - Attachment description: MozReview Request: Bug 1171654 - Move testing flag to DevToolsUtils. r=ochameau → MozReview Request: Bug 1171654 - Move testing flag to DevToolsUtils. r?ochameau
Comment on attachment 8620515 [details]
MozReview Request: Bug 1171654 - Report stacks for pending requests. r=ochameau

Bug 1171654 - Record stacks of pending requests. r?ochameau
Comment on attachment 8620516 [details]
MozReview Request: Bug 1171654 - Move testing flag to DevToolsUtils. r?ochameau

Bug 1171654 - Move testing flag to DevToolsUtils. r?ochameau
Comment on attachment 8620515 [details]
MozReview Request: Bug 1171654 - Report stacks for pending requests. r=ochameau

https://reviewboard.mozilla.org/r/10785/#review10741
Attachment #8620515 - Flags: review?(poirot.alex) → review+
Comment on attachment 8620516 [details]
MozReview Request: Bug 1171654 - Move testing flag to DevToolsUtils. r?ochameau

https://reviewboard.mozilla.org/r/10787/#review10739

Could you spawn some more instances of mochitest-devtools, just to be sure there is no hidden intermittent?

::: browser/devtools/styleeditor/test/browser_styleeditor_fetch-from-cache.js
(Diff revision 3)
> -  gDevTools.testing = isTesting;

Do you know why this test used to toggle testing and no longer needs to? (was that just copy paste?)
Attachment #8620516 - Flags: review?(poirot.alex) → review+
I'm lost now, it looks like you did the same patch in bug 1151414, but without using testing flag?!
Nick, maybe you can provide some guidance here.  This bug (which I wrote patches for, but then I forgot about while working on RDP async stacks which you reviewed recently - bug 1151414) wanted to record just "regular" stacks when a protocol.js request is sent.

At the time that Alex and I discussed this particular bug, it seemed logical to only do the stack recording during testing, in case there was speed or memory cost worth avoiding for every RDP request.

So, my question is: is stack recording in general an expensive operation in time and/or space to be avoided for the case of every RDP request?  What about in the async stack case?  I am aware of bug 1152893 (async performance regressions), but I was not sure if I should be worried about that here.
Flags: needinfo?(nfitzgerald)
(In reply to J. Ryan Stinnett [:jryans] (use ni?) from comment #13)
> So, my question is: is stack recording in general an expensive operation in
> time and/or space to be avoided for the case of every RDP request?  What
> about in the async stack case?  I am aware of bug 1152893 (async performance
> regressions), but I was not sure if I should be worried about that here.

I wouldn't worry much about bug 1152893; that is when you are microbenchmarking an operation that captures an async stack in a loop some thousand of times vs one an operation that does not. We never do anything like that with RDP protocol requests, but unfortunately stuff on the web does do that with promises. Either way, I wouldn't worry about it here. And we are improving the situation in bug 1028418 and bug 1177508.

TLDR: I wouldn't worry about it.
Flags: needinfo?(nfitzgerald)
Oh, and regarding space: can't get around the fact that you are capturing stacks and need to store them somewhere, when before you were not, however the js::SavedStacks machinery was designed to be compact: http://fitzgeraldnick.com/weblog/61/
Thanks Nick.  So, it seems like we can leave async stacks always on for RDP requests.

The original focus of this bug is no longer relevant, but I'll proceed with the testing flag move in a new bug.
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → WONTFIX
Will continue the testing flag work in bug 1178851.
Actually, I was looking at a pending request failure, and bug 1151414 only shows stack of request failure, not *pending* rejection.
Status: RESOLVED → REOPENED
Resolution: WONTFIX → ---
Attachment #8620515 - Attachment description: MozReview Request: Bug 1171654 - Record stacks of pending requests. r?ochameau → MozReview Request: Bug 1171654 - Report stacks for pending requests. r=ochameau
Attachment #8620515 - Flags: review+ → review?(poirot.alex)
Comment on attachment 8620515 [details]
MozReview Request: Bug 1171654 - Report stacks for pending requests. r=ochameau

Bug 1171654 - Report stacks for pending requests. r=ochameau
Comment on attachment 8620515 [details]
MozReview Request: Bug 1171654 - Report stacks for pending requests. r=ochameau

I'm able to debug pending now, thanks!
Attachment #8620515 - Flags: review?(poirot.alex) → review+
https://hg.mozilla.org/mozilla-central/rev/5819373caa6e
Status: REOPENED → RESOLVED
Closed: 9 years ago9 years ago
Resolution: --- → FIXED
Target Milestone: --- → Firefox 42
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: