aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSteven Rostedt (Google) <rostedt@goodmis.org>2023-05-30 02:02:32 -0400
committerSteven Rostedt (Google) <rostedt@goodmis.org>2023-05-30 02:05:28 -0400
commit25cd2064491ee2eee8f815fc373a2ad841a6bc57 (patch)
tree5c480f595a42f2a58c92a8a53cdab15c6a456231
parent6b6d43fd66e81ab1d2586151f57786060e5b3c92 (diff)
downloadlibtracefs-25cd2064491ee2eee8f815fc373a2ad841a6bc57.tar.gz
libtracefs: Clarify the tracefs_synth_create() man page
The man page for tracefs_synth_create() and tracefs_synth_set_instance() suggests that if a synthetic event is created in a specific instance, then it can only be used by that instance. This is incorrect. Synthetic events created anywhere are global, and can be used by all instances. Update the man pages to explicitly express this. Link: https://lore.kernel.org/linux-trace-devel/20230530020232.5ad0376c@rorschach.local.home Cc: Tzvetomir Stoyanov <tz.stoyanov@gmail.com> Signed-off-by: Steven Rostedt (Google) <rostedt@goodmis.org>
-rw-r--r--Documentation/libtracefs-synth2.txt24
1 files changed, 16 insertions, 8 deletions
diff --git a/Documentation/libtracefs-synth2.txt b/Documentation/libtracefs-synth2.txt
index d94fa7c..77cdd01 100644
--- a/Documentation/libtracefs-synth2.txt
+++ b/Documentation/libtracefs-synth2.txt
@@ -46,11 +46,14 @@ as a field for both events to calculate the delta in nanoseconds, or use
*TRACEFS_TIMESTAMP_USECS* as the compare fields for both events to calculate the
delta in microseconds. This is used as the example below.
-*tracefs_synth_create*() creates the synthetic event in the system. By default, the synthetic
-events are created in the top trace instance and apply across all instances.
-The *tracefs_synth_set_instance()* API can be used to set a custom instance, where the synthetic
-event will be created. In that case the event operates only in that instance. A synthetic event
-must be created with *tracefs_synth_alloc*(3) before it can be created.
+*tracefs_synth_create*() creates the synthetic event in the system. By default,
+the histogram triggers are created in the top trace instance, as any synthetic
+event can be used globally across all instances. In case an application wants
+to keep the histogram triggers out of the top level instance, it can use
+*tracefs_synth_set_instance()* to have the histograms used for creating the
+synthetic event in an instance other than the top level. A synthetic event
+descriptor must be created with *tracefs_synth_alloc*(3) before this can be
+used to create it on the system.
*tracefs_synth_destroy*() destroys the synthetic event. It will attempt to stop the running of it in
its instance (top by default), but if its running in another instance this may fail as busy.
@@ -77,9 +80,14 @@ then save the given _save_fields_ list. The fields will be stored in the histogr
"hist" file of the event that can be retrieved with *tracefs_event_file_read*(3).
_var_ must be one of the _name_ elements used in *tracefs_synth_add_end_field*(3).
-*tracefs_synth_set_instance()* Set the trace instance, where the synthetic event will be
-created. By default, the top instance is used. This API must be called before the call to
-*tracefs_synth_create()*, in order to use the new instance when creating the event.
+*tracefs_synth_set_instance()* Set the trace instance, where the histogram
+triggers that create the synthetic event will be created. By default, the top
+instance is used. This API must be called before the call to
+*tracefs_synth_create()*, in order to use the new instance when creating the
+event. Note, that even if the synthetic event is created in an instance, it is
+still visible by all other instances including the top level. That is, other
+instances can enable the created synthetic event and have it traced in the
+buffers that belong to the instance that enabled it.
RETURN VALUE
------------