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
Control triggers at runtime #1646
Conversation
25e7aa9
to
8bc9d89
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update. It might be in v0.14 if it finishes in time.
When do you plan to release v0.14? |
No specific date, but I hope I can do it this weekend. :) |
8bc9d89
to
208b46e
Compare
208b46e
to
dc36d43
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the update.
dc36d43
to
8055e9a
Compare
Note: I renamed a field in the action structure, because I can never figure out intuitively whether struct trigger_action_parser {
const char *name;
int (*parse)(char *action, struct uftrace_trigger *tr,
struct uftrace_filter_setting *setting);
- unsigned long flags;
+ enum trigger_flag compat_flags; /* flags the action is restricted to */
}; |
I'm ok with |
8055e9a
to
8345288
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The second last commit message looks squashed, please update. Otherwise looks good!
8345288
to
99b84ab
Compare
Yes I missed that. Thank you again Namhyung! |
Can you please rebase to the current master? |
The --trigger option was documented but not implemented. Signed-off-by: Clément Guidi <cguidi@ciena.com>
Make it clear that the action flags are the flags the action is compatible with. Signed-off-by: Clément Guidi <cguidi@ciena.com>
Register triggers at runtime using the agent. The '--trigger' option can be used from the client, and is forwarded to the target. Signed-off-by: Clément Guidi <cguidi@ciena.com>
Handle 'clear' action separately so it doesn't interfere with other actions' flags. Signed-off-by: Clément Guidi <cguidi@ciena.com>
Disable and delete trigger actions at runtime from the client. Use the 'clear' action to delete the given actions, or all actions associated to a given symbol. $ uftrace -p PID -T func@clear # clear all 'func' triggers $ uftrace -p PID -T func@clear=act1+act2 # clear act1 and act2 on 'func' The following trigger actions are supported: arg, retval, filter, depth, time, size, hide, trace, finish, read, color, backtrace, recover. Signed-off-by: Clément Guidi <cguidi@ciena.com>
Add and remove various trigger actions at runtime. Signed-off-by: Clément Guidi <cguidi@ciena.com>
99b84ab
to
e5d11a2
Compare
Done. I'm updating #1647 now. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, thanks!
These commits give the user full control over triggers at runtime. It applies to
all actions.
It allows the user to control the target process from the client as follows:
$ uftrace -p PID -T func@act1[,act2]
$ uftrace -p PID -T func@act1[,act2],clear
$ uftrace -p PID -T func@clear
Trigger parameters can be omitted when deleting actions. For example:
$ uftrace -p PID -T func@depth,clear
$ uftrace -p PID -T func@time,read,clear
We also fix the
--trigger
option which was actually not implemented.Based on #1645.