firefox-devtools / profiler

Firefox Profiler — Web app for Firefox performance analysis
https://profiler.firefox.com
Mozilla Public License 2.0
1.18k stars 387 forks source link

Gecko Profiler 0.17 fails to start with Firefox 55.0.3 on FreeBSD #580

Closed grahamperrin closed 7 years ago

grahamperrin commented 7 years ago

The Start button is present but when it's clicked, profiling does not start.

2017-09-09 06 40 09

[grahamperrin@momh167-gjp4-hpelitebook8570p-freebsd] ~% date ; uname -v
Sat  9 Sep 2017 06:55:19 BST
FreeBSD 12.0-CURRENT #0 r320869: Mon Jul 10 13:57:55 UTC 2017     root@releng3.nyi.freebsd.org:/usr/obj/usr/src/sys/GENERIC 
[grahamperrin@momh167-gjp4-hpelitebook8570p-freebsd] ~% pkg info firefox | grep -i version
Version        : 55.0.3_1,1
[grahamperrin@momh167-gjp4-hpelitebook8570p-freebsd] ~% 
grahamperrin commented 7 years ago

From http://www.freshports.org/www/firefox:

pkg-message:

Some features available on other platforms are not implemented:

  • Performance profiling (requires GeckoProfiler)

Does that imply that profiling can not be implemented even when Gecko Profiler (the extension) is installed and enabled?


If it helps, from about:buildconfig:

/usr/bin/cc -std=gnu99 4.0.0 -Qunused-arguments -Wall -Wempty-body -Wignored-qualifiers -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wclass-varargs -Wloop-analysis -Wstring-conversion -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wno-gnu-zero-variadic-macro-arguments -Wformat-security -O2 -pipe -O3 -DLIBICONV_PLUG -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -fno-strict-aliasing -ffunction-sections -fdata-sections -fno-math-errno -pipe -I/usr/local/include
/usr/bin/c++ -std=gnu++11 4.0.0 -Qunused-arguments -D_GLIBCXX_USE_C99 -D_GLIBCXX_USE_C99_MATH_TR1 -D_DECLARE_C99_LDBL_MATH -DLIBICONV_PLUG -isystem /usr/local/include -Qunused-arguments -Wall -Wc++11-compat -Wempty-body -Wignored-qualifiers -Woverloaded-virtual -Wpointer-arith -Wsign-compare -Wtype-limits -Wunreachable-code -Wwrite-strings -Wno-invalid-offsetof -Wclass-varargs -Wloop-analysis -Wc++11-compat-pedantic -Wc++14-compat -Wc++14-compat-pedantic -Wc++1z-compat -Wcomma -Wimplicit-fallthrough -Wstring-conversion -Wno-inline-new-delete -Wno-error=deprecated-declarations -Wno-error=array-bounds -Wformat -Wno-gnu-zero-variadic-macro-arguments -Wformat-security -Wno-unknown-warning-option -Wno-return-type-c-linkage -O2 -pipe -O3 -DLIBICONV_PLUG -fstack-protector -isystem /usr/local/include -fno-strict-aliasing -DLIBICONV_PLUG -isystem /usr/local/include -fno-exceptions -fno-strict-aliasing -fno-rtti -ffunction-sections -fdata-sections -fno-exceptions -fno-math-errno -pipe -I/usr/local/include -O2 -O3 -fomit-frame-pointer -D_GLIBCXX_USE_C99 -D_GLIBCXX_USE_C99_MATH_TR1 -D_DECLARE_C99_LDBL_MATH -DLIBICONV_PLUG -isystem /usr/local/include

– and:

CONFIG_SHELL=/bin/sh --enable-application=browser --enable-update-channel=release --disable-tests PKG_CONFIG=pkgconf CC=cc CXX=c++ --disable-debug-symbols --enable-system-ffi --enable-default-toolkit=cairo-gtk3 --with-system-graphite2 --with-system-harfbuzz --enable-necko-protocols=default PERL=/usr/local/bin/perl MAKE=gmake --enable-system-hunspell --enable-alsa --enable-dtrace --enable-extensions=default --disable-gconf --disable-gold --disable-install-strip --disable-libproxy --enable-official-branding --enable-optimize --enable-pie --enable-pulseaudio --enable-release --enable-startup-notification --disable-strip --enable-system-pixman --enable-system-sqlite --disable-updater --prefix=/usr/local --with-intl-api --with-pthreads --with-system-bz2 --with-system-icu --with-system-jpeg=/usr/local --with-system-libevent --with-system-libvpx --with-system-nspr --with-system-nss --with-system-ogg --with-system-png=/usr/local --with-system-vorbis --with-system-zlib

mstange commented 7 years ago

Does that imply that profiling can not be implemented even when Gecko Profiler (the extension) is installed and enabled?

That's correct. Most of the Gecko profiler C++ code is disabled on BSD at the build level, because important parts are not implemented for that platform. Most notably, we're missing BSD variants of platform-*.cpp and shared-libraries-*.cc. Here are the Linux variants of those files: platform-linux-android.cpp shared-libraries-linux.cc

grahamperrin commented 6 years ago

Side note

It's intriguing to find this, recently, at http://www.freshports.org/www/firefox:

PROFILE=on: Build with profiling support

jbeich commented 6 years ago

PROFILE=on just passes --enable-profiling which predates GeckoProfiler. FreeBSD can still use external profilers like pmcstat(8) or dtrace(1) which don't like -fomit-frame-pointer inherited from --enable-optimize.

grahamperrin commented 4 years ago
  1. https://bugzilla.mozilla.org/show_bug.cgi?id=1634205#c23
  2. here:

image

– it works. Rocking.