Comments (5)
The code to do the conversion can be found at https://cs.android.com/android/platform/superproject/main/+/main:external/perfetto/src/perfetto_cmd/config.cc but TLDR:
-t
maps toduration_ms
in the config- all of the atrace categories map to the
atrace_categories
section of thelinux.ftrace
datasource
see the "full trace config" section of https://perfetto.dev/docs/quickstart/android-tracing#recording-a-trace-through-the-cmdline for information on this.
from perfetto.
In general the best way to solve this problem is:
- Capture a trace via the cmdline (`-t 20s yada yada')
- Open the trace with the UI and look at the 'Info and stats page'
- Copy the full text config that is reported there. That is the translation that the code lalit linked does.
- profit
from perfetto.
Wow, that smart way! one question I have Trace.beginSection("MySection") in java code, but with that config, I still not see "MySection" keyword in trace, any other config should I add for this?
from perfetto.
I still not see "MySection" keyword in trace, any other config should I add for this?
You are likely not including your app's package in atrace_apps
section of the config.
from perfetto.
-a 'app name', which translates into atrace_apps: "app name" in the ftrace section of the config.
Example:
data_sources {
config {
name: "linux.ftrace"
target_buffer: 0
trace_duration_ms: 0
tracing_session_id: 0
enable_extra_guardrails: false
ftrace_config {
ftrace_events: "sched/sched_switch"
ftrace_events: "power/suspend_resume"
...
atrace_apps: "lmkd" # !!!!!!!!!!!!!!!!! THIS
}
from perfetto.
Related Issues (20)
- Setting to collapse the thread name column
- [UI] Minor UX regression with Tabs V2 HOT 3
- Race condition trying to load new content into Perfetto HOT 10
- Perfetto can load gz files but not zip. HOT 1
- When the same id is used in the Flow EVENT, it is drawn strangely. HOT 1
- sdk example_custom_data_source does not load HOT 10
- Invalid URL HOT 1
- How to get system begin time of a trace slice HOT 4
- Certain tables dont get populated with data HOT 1
- Is it possible to show all dependencies at once? HOT 1
- The priority of the same thread suddenly changes in a trace. HOT 7
- UI enhancement: Exclude non-returning syscalls like sys_rt_sigreturn from processing to prevent endless slices HOT 11
- cpu_profiler.py uses tempfile before closing it on window 10 problems HOT 1
- A timestamp display issue of perfetto HOT 8
- Cannot open the settings page HOT 2
- How to lock the range of Perfetto timeline HOT 6
- Problem with parsing 64bits tid fields in JSON captures HOT 3
- How to merge same methods in Web UI? HOT 1
- Cant find any data from android.dvfs and android.battery in moto g40 fusion(anddroid 12) HOT 2
- Error "col: 'name': SQL value is NULL but that was not expected" HOT 7
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.