Comments (3)
If you managed to build your binary and library with two completely separate instances of perfetto (different static data and different static TLS), yes you would need to initialize perfetto again in your library.
from perfetto.
@ddiproietto Thanks for your response. One more question, my application is divided into binary and tons of shared libraries. If I want to trace code in each shared library, do I have to compile perfetto sdk code into each shared library? Basically, I don't want to compile statically thousands lines of perfetto sdk code into each shared library, and thus inflate size of library. On the other hand, Perfetto doc says it is discouraged to attempt to build the C++ tracing library as shared library and use it from a different linker unit.
Is there a proper solution for this scenario?
from perfetto.
Perfetto doc says it is discouraged to attempt to build the C++ tracing library as shared library and use it from a different linker unit.
That's right, we don't have a well define ABI surface (not even an unstable ABI surface) that we're comfortable maintaining.
Is there a proper solution for this scenario?
There's a new C API that has an ABI that we intend to maintain as a shared library boundary.
The headers for this API are in https://github.com/google/perfetto/tree/master/include/perfetto/public, examples of usage are in https://github.com/google/perfetto/blob/master/examples/shared_lib/example_shlib_data_source.c, https://github.com/google/perfetto/blob/master/examples/shared_lib/example_shlib_track_event.c and https://github.com/google/perfetto/blob/master/src/shared_lib/test/api_integrationtest.cc
Most of the functionality of the C++ API is there. Given that it's a newer API, it's possible that we're going to make backwards incompatible changes in the near future.
from perfetto.
Related Issues (20)
- The recent updates seem to not support regular expression search. HOT 4
- Cannot write track events with custom datasource HOT 4
- tracing_muxer_impl.cc calls deprecated version of std::atomic_store HOT 8
- still racy prebuilt download HOT 11
- traced_probes crash HOT 4
- Question about the perfetto UI HOT 8
- How to turn off PERFETTO_WATCHDOG when compiling? HOT 1
- Perfetto is crashed HOT 5
- Perfetto UI: Minimizing the size of deployed files? HOT 12
- Feature request: support serving Perfetto UI resources from a different directory HOT 7
- A wrong link in docs/reference /perfetto-cli.md
- Why does The perfetto UI display The Trace Processor instance on X.X.X. x:9002 is too old? HOT 7
- ToTimecode function is not work properly HOT 1
- How to quickly locate a ftrace slice on the timeline based on the start timestamp HOT 1
- Empty auxiliary tracks show up as crashed? HOT 2
- How to cut a large perfetto trace to some small file HOT 1
- Why can't I click the box corresponding to a single ftrace event? HOT 1
- Trace counters aren't present in timeline HOT 2
- traces with low timestamped logcat events fail to open properly HOT 1
- feature request: selectively display specific slice
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from perfetto.