Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A new trigger type for global control #1896

Open
namhyung opened this issue Mar 3, 2024 · 5 comments
Open

A new trigger type for global control #1896

namhyung opened this issue Mar 3, 2024 · 5 comments

Comments

@namhyung
Copy link
Owner

namhyung commented Mar 3, 2024

I remember there were some suggestions using file size or elapsed time as a trigger point and associate (global) actions to it (But I cannot find where). For example, we might do things like:

  • tracing is off by default, and turn it on after 10 seconds
  • similarly, trace only the first 3 seconds of execution
  • or trace only from 5 second to 10 second of execution
  • finish the tracing when file size reaches to 100 MB

There's --signal option for the similar purpose, but it only handles signals. Maybe we can add time and size support there, or have a new option to handle it separately.

@honggyukim
Copy link
Collaborator

This is related to #1699.

@namhyung
Copy link
Owner Author

namhyung commented Mar 3, 2024

Actually we can use timeout command to send a signal at given time: #1598 (comment).

For the first case above, this would do the job (but much more verbose).

$ timeout -s RTMIN 10  uftrace --trace=off --signal RTMIN@trace_on <target-program>

@namhyung
Copy link
Owner Author

namhyung commented Mar 3, 2024

This could be

$ uftrace --trace=off --signal time=10s@trace_on <target-program>

@honggyukim
Copy link
Collaborator

honggyukim commented Mar 3, 2024

How about the following interface as mentioned at #1699?

# trace target program since 10s elapsed from the beginning.
$ uftrace --trace=10s~ ./prog

This can be much simpler.

@namhyung
Copy link
Owner Author

namhyung commented Mar 3, 2024

Yep, that looks better. I think we also need data size support (maybe only needed for finish action).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants