google / perfetto

Performance instrumentation and tracing for Android, Linux and Chrome (read-only mirror of https://android.googlesource.com/platform/external/perfetto/)

Home Page:https://www.perfetto.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

trace_processor_shell binary is too big after built with gn

yufailuvatar opened this issue · comments

hi guys,
i am a blooding new user of the ownsome tool. I have met a issue when built trace_processor_shell with gn. when the build args are linux/x64/is_debug=false, we still get much bigger size bin file , which is larger than 100MB. But the one downloaded by curl -LO https://get.perfetto.dev/trace_processor is much smaller , which is less than 8MB. If i want to get customized trace_processor_shell with this pretty file size, how could i do to build it?

and i have to post another issue here. we used the contents in ./out/dist folder to deploy a https server providing perfetto ui services. However, Chrome brower can not get service_worker.js due to security issues , but FireFox works well. Except this issue, all other features worked well in Chrome. How can we fixed this issue ?

About tpshell: look in the out/xxx/stripped folder. There are 2 outputs for each binary:

  • out/xxx/trace_processor_shell -> unstripped (i.e. with debug symbols)
  • out/xxx/stripped/trace_processor_shell -> stripped

we used the contents in ./out/dist folder to deploy a https server providing perfetto ui services. However, Chrome brower can not get service_worker.js due to security issues , but FireFox works well. Except this issue, all other features worked well in Chrome. How can we fixed this issue ?

Where are you hosting this? One thing you need to know is that chrome (and IIRC Safari) are quite picky on security origins.
Service worker and many other features (e.g. webusb) require a secure origin. From the chrome viewpoint:

There is nothing else we can do about that. Also I guarantee that you will find issue elsewhere, it's not just the SW registration.