GithubHelp home page GithubHelp logo

bgirard / gecko-profiler-addon Goto Github PK

View Code? Open in Web Editor NEW
54.0 54.0 33.0 11.63 MB

Addon to control the Gecko Built-in Profiler

Home Page: https://developer.mozilla.org/en/Performance/Profiling_with_the_Built-in_Profiler

Shell 2.01% JavaScript 92.79% CSS 2.52% HTML 2.67%

gecko-profiler-addon's People

Contributors

bgirard avatar cixtor avatar dblohm7 avatar dcrewi avatar ehsan avatar gijsk avatar glandium avatar joedrew avatar jrmuizel avatar kwierso avatar maks avatar mikeconley avatar mstange avatar nephyrin avatar past avatar snorp avatar staktrace avatar syg avatar thinkeryzu avatar vdjeric avatar vikstrous avatar vvuk avatar wlach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

gecko-profiler-addon's Issues

gecko profiler causes bsod on windows 7

hi,
installing gecko profiler addon causes my windows 7 sp1 x64 to go into blue screen of death with "SYSTEM_SERVICE_EXCEPTION". It first happened when i first try the profiler on summer (on aurora 16 i guess), after then i've removed it and didn't try until now. Today i've installed the addon again, on aurora 20, and the result is same. didn't even need to start the profiler, just installed it, then continued browsing and few minutes later, BSOD.

I want to share the memory dump in a private manner, but don't know how to / where to send it.

thanks.

Stuck at "Retrieving profile"

I see two unreachable code after return statement errors and a TypeError: types is undefined which comes from:

function inflateSchemaProfileThreads(profile) {
  function maybeTableEntry(table, index) {
    return index == undefined ? undefined : table[index];
  }

  function inflateOptimizations(optimizations, stringTable) {
    if (optimizations == undefined) {
      return undefined;
    }

    let types = optimizations.types;
    let inflatedTypes = new Array(types.length);

I'm using Firefox Nightly on Linux.

Profiler is always on

I'm getting constant SIGPROF's on Linux, which causes 20-25% CPU usage. When I disable the addon, I only get SIGPROF's when I'm using the profiler.

Crashes Firefox Nightly 64 bit.

I have an exact series of steps to crash Firefox Nightly 64bit on Windows 7 (50.0a) just by using Gecko Profiler.

1. Enable Gecko Profiler
2. Visit about:support (Help menu > Troubleshooting)
3. Watch Firefox Nightly 64 bit crash fast and hard.

Running the profiler without going this page will allow Firefox to run a little bit longer but it will eventually crash as well depending on the pages and tabs you are running.

Analyze button doesn't work after pressing stop

Today's Win 32bit Nightly, profiler addon v1.8.5 (from raw github xpi link), OS: win7x64

  1. Press start
  2. Press stop when you've performed whatever you want profiling
  3. Press Analyze

Expected:
The analyze profile window appears.

Actual:
Nothing happens. It appears you have to press analyze whilst the profiler is still running (which isn't obvious, since the analyze button isn't marked as inactive when you press stop).

No longer working in thunderbird

On startup, gives
Unsupported Application: The module sdk/clipboard currently supports only Firefox.

clipboard looks unused, but commenting it out yields:
Unsupported Application: The module sdk/panel currently supports only Firefox.

Which looks more serious :(

Can't access recently uploaded profiles

Cannot access profiles I have uploaded from the addon over the last 24 hours.

Receive an error such as "Error in worker: Exception: SyntaxError: JSON.parse: expected ',' or '}' after property value in object (http://people.mozilla.com/~bgirard/cleopatra/js/parserWorker.js:244)". Or the simply see "About to start next task...", which never happens.

Example profiles:

http://people.mozilla.com/~bgirard/cleopatra/?report=f57e88426b6a64ce94d426062a646b9b63d0b9a3

http://people.mozilla.com/~bgirard/cleopatra/?report=711677693f4fee4788544f96ffabb50772bf59c3

Can't analyze the result with sample buffer size 14,000,000 and sample interval 1 ms

Environment:

  • OS Ubuntu 14.04
  • HW i7-3770 3.4GMhz
  • 16GB Ram
  • 1TB SATA HDD
  • GK107 [GeForce GT 640]/ GF108 [GeForce GT 440/630]

Steps

  • Modify the setting and set the sample buffer size to 14,000,000 and sample interval 1 ms
  • Re-open the browser
  • surfing a webpage over 10 minutes

Result

  • system still got memory over 5GB through top command
  • the analyze window show blank and the status of status bar show "Finished" or "About the start next task",
  • Left panel and bottom panel didn't show anything

Firefox startup hangs if "Main Thread I/O" is enabled

Firefox nightly starts OK in safe mode. So tried with profiler enabled - with Main Thread I/O enabled firefox hangs, disabled firefox starts OK

Occurs with profiler 1.12.21 and its immediate predecessor
Firefox nightly 20130203 and today's 20130211

Deactivating the Profiler extension without first stopping profiling regresses performance

STR:

  1. Enable Profiler extension (the profiler should be in the running state) in about:addons
  2. Open about:newtab
  3. Disable Profiler extension in about:addons
  4. Drag a thumbnail around in about:newtab. Dragging the thumbnail around will be janky.

Instead of about:newtab the issue can be observed by dragging a tab in a Nightly build with tab dragging animations.

Opening the profiler doorhanger from the Addon bar and stopping profiling before deactivating the extension results in no perceptible performance loss.

OS is Windows 7 64bit, reproduced on the 32bit Nightly builds and Aurora with and without HWA.

Can't capture profile if Private Browsing window open.

I can understand why this is the default, however it'd be great if there was a an "override" that was easily to find.

use case: I use a private browsing window to have 2nd account signed in (e.g. github). I can't capture any data because of that.

No button to be found?

I have no clue what the 'topright toolbar' is supposed to be, but I've looked at any toolbar imaginable and none seem to have any button whatsoever.

Add-on installation hangs at verification.

Trying to install gecko profiler to current Nightly with STR:

  1. Downloaded https://github.com/bgirard/Gecko-Profiler-Addon/blob/master/src/geckoprofiler.xpi
  2. From the local computer Downloads folder, dragged the downloaded xpi file on top of the browser window.

That gives me a downloading and verifying screen:

addon_doesnt_verify

But that screen never finished even after I leave it there for 10 minutes, and the add-on doesn't install. (Btw, do you prefer bug reports here or bugzilla?)

profiling with Breakpad on android x86 devices

When attempting to get breakpad profiling (via Mobile USB option) for fennec running on a android x86 device (pc type hardware running androix-x86.org ics rc2 build) I'm not able to get any stack profiling information back.

This is using current version of the addon with latest fennec x86 nightly.

When the addon first connects to the device, I do see it successfully copy across all the system libs on to my laptop, into /tmp.

I tried using android-ndk-r8e/toolchains/x86-4.6/prebuilt/linux-x86_64/bin/i686-linux-android-addr2line instead of arm-eabi-addr2line (via aliasing on PATH) but that didn't seem to change anything and strangely I could still use it to see (full stack function info) with traces made on a arm device.

When using with fennec on x86, I'm able to get as far as clicking analyze but then I just get an empty trace in the cleopatra ui and in terminal running ff all I see is:

Fetching js source
Resolve symbol
2013-09-13 19:53:20: dump_symbols.cc:584: INFO: 
2013-09-13 19:53:20: dump_symbols.cc:585: INFO: LoadSymbols: BEGIN   /usr/lib/x86_64-linux-gnu/libxml2.so.2
2013-09-13 19:53:20: dump_symbols.cc:685: INFO: LoadSymbols:   read CFI from .eh_frame
2013-09-13 19:53:20: dump_symbols.cc:788: INFO: LoadSymbols: SUCCESS /usr/lib/x86_64-linux-gnu/libxml2.so.2
2013-09-13 19:53:20: dump_symbols.cc:584: INFO: 
2013-09-13 19:53:20: dump_symbols.cc:585: INFO: LoadSymbols: BEGIN   /usr/lib/x86_64-linux-gnu/librsvg-2.so.2
2013-09-13 19:53:20: dump_symbols.cc:685: INFO: LoadSymbols:   read CFI from .eh_frame
2013-09-13 19:53:20: dump_symbols.cc:788: INFO: LoadSymbols: SUCCESS /usr/lib/x86_64-linux-gnu/librsvg-2.so.2
2013-09-13 19:53:20: dump_symbols.cc:584: INFO: 
2013-09-13 19:53:20: dump_symbols.cc:585: INFO: LoadSymbols: BEGIN   /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
2013-09-13 19:53:20: dump_symbols.cc:685: INFO: LoadSymbols:   read CFI from .eh_frame
2013-09-13 19:53:20: dump_symbols.cc:788: INFO: LoadSymbols: SUCCESS /usr/lib/x86_64-linux-gnu/gdk-pixbuf-2.0/2.10.0/loaders/libpixbufloader-svg.so
2013-09-13 19:53:20: dump_symbols.cc:584: INFO: 
2013-09-13 19:53:20: dump_symbols.cc:585: INFO: LoadSymbols: BEGIN   /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0
2013-09-13 19:53:20: dump_symbols.cc:685: INFO: LoadSymbols:   read CFI from .eh_frame
2013-09-13 19:53:20: dump_symbols.cc:788: INFO: LoadSymbols: SUCCESS /usr/lib/x86_64-linux-gnu/libgdk_pixbuf-2.0.so.0

Error: "Unable to connect to the Gecko profiler add-on within five seconds."

Build identifier: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:55.0) Gecko/20100101 Firefox/55.0

I'm using Gecko Profile 0.8, from today, May 9th.

Invoking a profile capture, I just got:
unable-connect-gecko-profiler-error

Error was: 'Error: Unable to connect to the Gecko profiler add-on within five seconds.'. The full stack has been written to the Web Console.

Error: Unable to connect to the Gecko profiler add-on within five seconds.
Stack trace:
e/</<@https://perf-html.io/9170dacdedc70ab6d307.bundle.js:30:6819
9170dacdedc70ab6d307.bundle.js:33:6467
Unhandled promise rejection Error: Unable to connect to the Gecko profiler add-on within five seconds.
Stack trace:
e/</<@https://perf-html.io/9170dacdedc70ab6d307.bundle.js:30:6819
9170dacdedc70ab6d307.bundle.js:35:46
Successfully compiled asm.js code (loaded from cache in 9169ms)
zee-worker.js

Nothing is working

I don't have a profiler toolbar button any more, the keyboard shortcuts don't work either, and I don't see any error messages in the browser console. I installed the extension by dragging geckoprofiler.xpi into my browser. I'm using version 1.16.9.

SymbolicateWorker shouldn't keep on using lots of memory after symbolication

After opening a new profile and thus symbolicating the data, the worker that does the symbolication doesn't seem to release its memory.

Right now, I have a worker using 365Mb, with cleopatra closed and the profiler deactivated. Memory usage stays that high indefinitely, it seems. Performing a GC from about:memory reduced it to 219Mb, with additional GCs or CCs not changing anything. Minimizing memory from about:memory, however, reduces it to 1.5Mb.

Not able to pull samples from b2g device

Following the instructions on the wiki, if I do

  1. Get libs
  2. Pull
  3. (Run test)
  4. Pull

the second pull stays stuck at "Symbolicating...". There's no SIGUSR2 delivered to the b2g process to dump its profile data.

linux support

What's the automatic (i.e. one click, no restart) way of installing this plugin on Linux? On addons.mozilla.org I get the "not available for your platform" message. Checking all related bugs for profiler on Linux, they are RESOLVED FIXED so maybe this platform should be enabled?

Java profiling for Fennec broken

Profiling C++/JS works fine, however when trying to profile Java code as well, the process hangs at the "Retrieving profile" stage.
Looking at the debug output, it gets as far as

Get profile
get json profile
got json profile

and then runs into trouble here because the Java thread doesn't have any frameTable data. In fact, it doesn't appear to have anything but simple sample data with frames.

Assertion failure: nsContentUtils::IsSystemPrincipal(principal)

After install of https://github.com/bgirard/Gecko-Profiler-Addon/raw/master/geckoprofiler.xpi on startup I get a crash with the following console stack trace:

Assertion failure: nsContentUtils::IsSystemPrincipal(principal), at /builds/slave/m-cen-osx64-ntly-0000000000000/build/js/xpconnect/src/XPCWrappedNativeScope.cpp:133
#01: _ZN7mozilla3dom12CreateGlobalI14nsGlobalWindowXadL_ZNS0_13WindowBinding20GetProtoObjectHandleEP9JSContextN2JS6HandleIP8JSObjectEEEEEEbS5_PT_P14nsWrapperCachePK7JSClassRNS6_18CompartmentOptionsEP12JSPrincipalsbNS6_13MutableHandleIS9_EE[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x14532f1]
#02: _ZN7mozilla3dom13WindowBinding4WrapEP9JSContextP14nsGlobalWindowP14nsWrapperCacheRN2JS18CompartmentOptionsEP12JSPrincipalsb[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x13d68c5]
#03: _ZN14nsGlobalWindow14SetNewDocumentEP11nsIDocumentP11nsISupportsb[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0xbc3a8a]
#04: _ZN16nsDocumentViewer12InitInternalEP9nsIWidgetP11nsISupportsRK9nsIntRectbbb[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x1cc92c1]
#05: _ZN16nsDocumentViewer4InitEP9nsIWidgetRK9nsIntRect[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x1cc8dd8]
#06: _ZN10nsDocShell14SetupNewViewerEP16nsIContentViewer[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x20756bd]
#07: _ZN10nsDocShell5EmbedEP16nsIContentViewerPKcP11nsISupports[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x2074ff7]
#08: _ZN10nsDocShell19CreateContentViewerEPKcP10nsIRequestPP17nsIStreamListener[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x2059038]
#09: _ZN22nsDSURIContentListener9DoContentEPKcbP10nsIRequestPP17nsIStreamListenerPb[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x2058415]
#10: _ZN18nsDocumentOpenInfo18TryContentListenerEP21nsIURIContentListenerP10nsIChannel[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x920095]
#11: _ZN18nsDocumentOpenInfo15DispatchContentEP10nsIRequestP11nsISupports[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x91f3e3]
#12: _ZN18nsDocumentOpenInfo14OnStartRequestEP10nsIRequestP11nsISupports[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x91f110]
#13: _ZThn16_N12nsJARChannel14OnStartRequestEP10nsIRequestP11nsISupports[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x763ebf]
#14: _ZN17nsInputStreamPump12OnStateStartEv[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x124169]
#15: _ZN17nsInputStreamPump18OnInputStreamReadyEP19nsIAsyncInputStream[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x123ee1]
#16: _ZN23nsInputStreamReadyEvent3RunEv[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x8d285]
#17: _ZN8nsThread16ProcessNextEventEbPb[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0xa0238]
#18: _Z23NS_ProcessPendingEventsP9nsIThreadj[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0xc0061]
#19: _ZN14nsBaseAppShell19NativeEventCallbackEv[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x1a41e77]
#20: _ZN10nsAppShell18ProcessGeckoEventsEPv[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x1a89720]
#21: __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x12b31]
#22: __CFRunLoopDoSources0[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x12455]
#23: __CFRunLoopRun[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x357f5]
#24: CFRunLoopRunSpecific[/System/Library/Frameworks/CoreFoundation.framework/Versions/A/CoreFoundation +0x350e2]
#25: RunCurrentEventLoopInMode[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x5feb4]
#26: ReceiveNextEventCommon[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x5fb94]
#27: BlockUntilNextEventMatchingListInMode[/System/Library/Frameworks/Carbon.framework/Versions/A/Frameworks/HIToolbox.framework/Versions/A/HIToolbox +0x5fae3]
#28: _DPSNextEvent[/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x155533]
#29: -[NSApplication nextEventMatchingMask:untilDate:inMode:dequeue:][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x154df2]
#30: -[GeckoNSApplication nextEventMatchingMask:untilDate:inMode:dequeue:][/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x1a88d66]
#31: -[NSApplication run][/System/Library/Frameworks/AppKit.framework/Versions/C/AppKit +0x14c1a3]
#32: _ZN10nsAppShell3RunEv[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x1a89e2d]
#33: _ZN12nsAppStartup3RunEv[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x2264889]
#34: _ZN7XREMain11XRE_mainRunEv[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x22ac4b9]
#35: _ZN7XREMain8XRE_mainEiPPcPK12nsXREAppData[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x22ac75d]
#36: XRE_main[/Applications/FirefoxNightly.app/Contents/MacOS/XUL +0x22aca84]
#37: main[/Applications/FirefoxNightly.app/Contents/MacOS/firefox-bin +0x1c7d]

Mac OS X 10.8.4 using Firefox Nightly:

AdapterDeviceID: 0x fd5
AdapterVendorID: 0x10de
Add-ons: %7B972ce4c6-7e08-4474-a285-3208198ce6fd%7D:36.0a1,jid0-edalmuivkozlouyij0lpdx548bc%40jetpack:1.14.2
BuildID: 20141107030202
CrashTime: 1415372313
DOMIPCEnabled: 1
EMCheckCompatibility: true
EventLoopNestingLevel: 1
FramePoisonBase: 7ffffffff0dea000
FramePoisonSize: 4096
InstallTime: 1415371410
Notes: AdapterVendorID: 0x10de, AdapterDeviceID: 0x fd5GL Layers? GL Context? GL Context+ GL Layers+
ProductID: {ec8030f7-c20a-464f-9b0e-13a3a9e97384}
ProductName: Firefox
ReleaseChannel: nightly
SecondsSinceLastCrash: 131
StartupTime: 1415372286
Theme: classic/1.0
Throttleable: 1
URL: about:blank
Vendor: Mozilla
Version: 36.0a1
useragent_locale: en-US

"Mobile USB" option fails when using adb over tcp

when trying to profile a device which doesn't have a non-host usb port (eg. android x86, pc like devices) you need to run adb over tcp instead.
This works fine for adb, but choosing the USB Mobile option in the add on causes this error to be displaye:
"You must have exactly one instance of Fennec running"

which seems to be because this code:
https://github.com/bgirard/Gecko-Profiler-Addon/blob/master/lib/remoteHost.js#L56-L64
is not parsing the output of adb devices correctly because when connected over tcp adb devices output is:

$ adb devices 
List of devices attached 
192.168.1.17:5555   device

Trying to use the "TCP" option connects fine but doesn't seem to know about pulling all the native libs of the device to enable breakpad profiling.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.