bgirard / gecko-profiler-addon Goto Github PK
View Code? Open in Web Editor NEWAddon to control the Gecko Built-in Profiler
Home Page: https://developer.mozilla.org/en/Performance/Profiling_with_the_Built-in_Profiler
Addon to control the Gecko Built-in Profiler
Home Page: https://developer.mozilla.org/en/Performance/Profiling_with_the_Built-in_Profiler
If I load sample data into the UI manually, I don't see a way to get the profiler to resolve the addresses in the profile.
Not sure if this is the right place to file this issue.
Why do you have to use js-ctypes to run /bin/bash
with argument -c
? Can't you just use nsIProcess
? And use >
redirector to write it to file and then read file?
File stuff with OS.File is very async.
I attempted to do it here: GitHub - GIST :: Noitidart / _ff-addon-snippet-X11_bash.js
But it doesn't work I don't know why.
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
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
Following the instructions on the wiki, if I do
the second pull stays stuck at "Symbolicating...". There's no SIGUSR2 delivered to the b2g process to dump its profile data.
Trying to install gecko profiler to current Nightly with STR:
That gives me a downloading and verifying screen:
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?)
STR:
about:addons
about:newtab
about:addons
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.
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.
I tried to make a patch to fix issue 56 but following the instructions in the README fail.
Specifically trying step 3:
https://github.com/bgirard/Gecko-Profiler-Addon/blob/master/README#L29-L32
fails because those repos either no longer exist on github or are marked private.
I can't install
https://github.com/bgirard/Gecko-Profiler-Addon/raw/master/geckoprofiler.xpi ,
Nightly (on Mac OS X) says
"This add-on could not be installed because it has not been verified."
Dragging the .xpi onto the Nightly window (as suggested by the README) doesn't do anything. When I open the .xpi via cmd-o I get the above error message. Also when I do "about:addons" -> "Install add-on from file".
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.
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 :(
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.
I get this message:
Couldn't find apk /data/app/org.mozilla.fennec-NUM.apk
That path is accessible only on a rooted device.
With Firefox Aurora (19.0a2) and version 1.10.17.
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:
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
They don't have permissions there. /data/local/tmp is safe to use.
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?
If I change profiler.symbolicationURL
to point my local server http://localhost:8000/gecko-profiler
, it keeps requesting symbols from the remote server. On Windows it works fine.
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.
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.
Bug 1240786 introduces BHR markers in the timeline. We should display them.
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
Today's Win 32bit Nightly, profiler addon v1.8.5 (from raw github xpi link), OS: win7x64
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).
Being able to see the load created by JS code at a glance would be very nice: a first analysis of bugs like 806975 would be much easier that way.
I think a "JavaScript % of total" entry in the "Selection Info" section would be enough for that.
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.
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
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.
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.
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.
Can getting Gecko-Profiler-Addon window opened by command line or other means
I wonder if some required backend server is down? All my sample analysis attempts (tap Ctrl-Shift-2 or press the Analyze button) hang on the Retrieving Profile screen, where the URL is pointing to https://cleopatra.io/.
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.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.