summaryrefslogtreecommitdiffstats
AgeCommit message (Collapse)AuthorFilesLines
2022-02-06ktrace: Use ktrace_help() for all help messagesHEADmasterSteven Rostedt (Google)4-84/+180
Consolidate the help messages into a ktrace_commands structure that can link to sub commands. Add a ktrace_help() helper function that can be called to print the commands and sub command help messages. This will be used for both the help command itself, and for improper usage of the commands that lack arguments. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-02-05ktrace: Add help infrastructureSteven Rostedt (Google)4-0/+94
Add a help function that will be used to describe the commands in more detail. Currently a very limited help is added, but it will be extended. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-02-05ktrace: Move header into its own include directorySteven Rostedt (Google)2-0/+2
Keep headers separate from C files, and move ktrace.h into its own include directory. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-02-01ktrace: Add 'all' and systems to enable and disable of eventsSteven Rostedt (Google)1-2/+33
All the user to enter 'all' or a particular system to enable all events or a group of events respectively. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-02-01ktrace: Have event_completion() be extendableSteven Rostedt (Google)3-28/+24
Currently event_completion() uses its own counter for the ccli_list_add*() functions. This means something that calls it can not add to the list. Have the counter passed to event_completion() such that the caller has more control. Also combine enable_event_completion() with disable_event_completion() into disenable_event_completion() as the code for both became a bit more complex, but is still exactly the same. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-02-01ktrace: Add disable tracing and eventsSteven Rostedt (Google)3-0/+101
Add the disable command to disable tracing and events just like the enable command works. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-02-01ktrace: Add enable completion and commandSteven Rostedt (Google)5-6/+136
Add the enable command that will enable tracing and an event. As well as completions for the commands. Note, so far only printing the "echo" commands are being done. In the future the commands will actually commit, but for now its still in development mode. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-02-01ktrace: Failure to read tracefs gives EACCES not EPERMSteven Rostedt (Google)1-1/+1
The error to tell the user they do not have access to read the tracefs file system used EPERM and not EACCES, to know to print that, and because of that, it did not print the proper message. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-02-01ktrace: Have synthetic event creation do deltasSteven Rostedt (Google)1-67/+229
Allow the create synthetic event allow fields to compare the start and end events. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-02-01ktrace: Use the ccli_list_* helper functions for completionsSteven Rostedt (Google)1-113/+86
Managing the list of completions is tedious and error prone, use the helper functions now provided by the ccli library for managing the list of completions to return. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-01-31ktrace: Save and load history of commandsSteven Rostedt (Google)1-0/+54
Use the new ccli API that lets you save and restore history. Add it to the .cache/ktrace file. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-01-29ktrace: Add code to create a synthetic eventSteven Rostedt (Google)1-84/+462
Add the "create synthetic" command and the completion to create a synthetic event. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-01-27ktrace: Add code to create a kprobeSteven Rostedt (Google)1-50/+131
Add the code to create a kprobe. It only prints the command for now, but will later actually create it. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-01-27ktrace: Add completions for create kprobeSteven Rostedt (Google)1-24/+192
Add the completion callback for creating kprobes. Add the kprobe functions, and offset and types. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
2022-01-27ktrace: Initial commitSteven Rostedt (Google)9-0/+1384
Initial commit of the shell like utility to access Linux tracing. Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>