Re: [PATCH v2 3/8] libtracefs man pages: APIs for working with trace systems and events.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, 21 Dec 2020 08:02:47 +0200
"Tzvetomir Stoyanov (VMware)" <tz.stoyanov@xxxxxxxxx> wrote:

> +char pass:[*]pass:[*]*tracefs_event_systems*(const char pass:[*]_tracing_dir_);
> +char pass:[*]pass:[*]*tracefs_system_events*(const char pass:[*]_tracing_dir_, const char pass:[*]_system_);
> +int *tracefs_iterate_raw_events*(struct tep_handle pass:[*]_tep_, struct tracefs_instance pass:[*]_instance_, cpu_set_t pass:[*]_cpus_, int _cpu_size_, int (pass:[*]_callback_)(struct tep_event pass:[*], struct tep_record pass:[*], int, void pass:[*]), void pass:[*]_callback_context_);
> +
> +--
> +
> +DESCRIPTION
> +-----------
> +Trace systems and events related APIs.
> +
> +The _tracefs_event_systems()_ function returns array of strings with the
> +names of all registered trace systems, located in the given _tracing_dir_
> +directory. This could be NULL or the location of the tracefs mount point
> +for the trace systems of the local machine, or it may be a path to a copy
> +of the tracefs directory from another machine. The last entry in the array
> +is a NULL pointer. The array must be freed with _tracefs_list_free()_ API.
> +
> +The _tracefs_system_events()_ function returns array of strings with the
> +names of all registered trace events for given trace system specified by
> +_system_, located in the given _tracing_dir_ directory. This could be NULL
> +or the location of the tracefs mount point for the trace systems of the
> +local machine, or it may be a path to a copy of the tracefs directory
> +from another machine. The last entry in the array as a NULL pointer.
> +The array must be freed with _tracefs_list_free()_ API.
> +
> +The _tracefs_interate_raw_events()_ function will read the tracefs raw
> +data buffers and call the specified _callback_ function for every event it
> +encounters. An initialized _tep_ handler is required (See
> +_tracefs_local_events_(3)). If _instance_ is NULL, then the toplevel
> +tracefs buffer is used, otherwise the buffer for the corresponding
> +_instance_ is read. To filter only on a subset of CPUs, _cpus_ and
> +_cpu_size_ may be set to only call _callback_ with events that occurred on
> +the CPUs specified, otherwise if _cpus_ is NULL then the _callback_
> +function will be called for all events, and _cpu_size_ is ignored. The
> +_callback_ function will be called with the following parameters: A
> +pointer to a struct tep_event that corresponds to the type of event the
> +record is; The record representing the event; The CPU that the event
> +occurred on; and a pointer to user specified _context_. If the _callback_

I changed "_context_" to "_callback_context_" as it should match the name
used above in the function prototype.

-- Steve

> +returns non-zero, the iteration stops.



[Index of Archives]     [Linux USB Development]     [Linux USB Development]     [Linux Audio Users]     [Yosemite Hiking]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux