Giter VIP home page Giter VIP logo

Comments (3)

primiano avatar primiano commented on May 31, 2024

I think what you really want here is --clone, where you can clone an existing session in another file without stopping.

Something like:

# Run the main perfetto instance that will go on forever
./perfetto --txt -c config.txt -o /dev/null   # the output file here is irrelevant

Then take a note of the tracing session ID using perfetto --query

Then when you want to take snapshots you can do

perfetto --clone $ID -o /path/to/snapshot

Alternative method

Note also that there is an alternative way to achieve induce self-clones using a combination of

trigger_config {
  triggers: {
    name: "my-trigger-name"
    stop_delay_ms: 2000
  }
  trigger_mode: CLONE_SNAPSHOT
}

And start a trace as ./perfetto --txt -c config.txt -o out_trace.pftrace

and then you can invoke trigger_perfetto "my-trigger-name"

Each snapshot in this case will end up in a new file, like out_trace-1.pftrace, out_trace-2.pftrace and so on

from perfetto.

duokuiwang avatar duokuiwang commented on May 31, 2024

Thanks!
However, the trigger mode must set the trigger_timeout_ms value, and the maximum is 7days. What we want to achieve is that perfetto cmd is always running (duration_ms: 0), and the perfetto process will not exit after triggering the trigger.

from perfetto.

primiano avatar primiano commented on May 31, 2024

Unfortunately I think you'll have to at least restart every 7 days. When you use triggers, trigger_timeout_ms becomes effectively duration_ms as it defines the lifetime of the main instance (which you don't care about).

from perfetto.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.