Closed Bug 1173923 Opened 9 years ago Closed 8 years ago

Executing console.profile and console.profileEnd doesn't happen in order

Categories

(DevTools :: Performance Tools (Profiler/Timeline), defect, P2)

defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1173588

People

(Reporter: epmatsw, Unassigned)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

1.06 KB, application/x-javascript
Details
Attached file consoleProfile.js
User Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:40.0) Gecko/20100101 Firefox/40.0
Build ID: 20150610004004

Steps to reproduce:

I'm trying to profile a particular function. To do so, I've created a test harness that calls console.profile("<display text for function>"), followed by the function, followed by console.profileEnd("<display text for function>"). However, this doesn't behave as expected. Sometimes, no profiling occurs at all. More often, the profiling is started, but never stops. I've attached sample code that reproduces this issue.


Actual results:

Profiler does not start when told to, or if it does start, does not end when expected.


Expected results:

Profiler starts, profiles function, and ends.
OS: Unspecified → Mac OS X
Hardware: Unspecified → x86
This happens to me too.

On B2G, at startup, if I call console.profile("x"), then console.profileEnd("x"), nothing happens. It's like console.profile is never called. If I reload though, console.profile("x") works, but console.profileEnd("x") doesn't. I have to manually call profileEnd. Even adding profileEnd in a setTimeout doesn't appear to stop the profile.

Jordan, any idea what's going on?
Status: UNCONFIRMED → NEW
Component: Untriaged → Developer Tools: Performance Tools (Profiler/Timeline)
Ever confirmed: true
Flags: needinfo?(jsantell)
Sorry, adding console.profileEnd() in a timeout appears to work.
Guessing this is similar to bug 1173588 -- the recording starts asynchronously, so when having a chunk of code wrapped in a profile/profileEnd all in the same tick, it's unlikely to record
Flags: needinfo?(jsantell)
Triaging. Filter on ADRENOCORTICOTROPIC (yes).
OS: Mac OS X → Unspecified
Priority: -- → P2
Hardware: x86 → Unspecified
Version: 40 Branch → unspecified
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → DUPLICATE
Product: Firefox → DevTools
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: