![]() |
LTTng control library C API
|
Data Structures | |
| struct | lttng_userspace_probe_location |
| Linux user space probe location (opaque type). More... | |
| struct | lttng_userspace_probe_location_lookup_method |
| Lookup method of a Linux user space probe location (opaque type). More... | |
Enumerations | |
| enum | lttng_userspace_probe_location_lookup_method_type { LTTNG_USERSPACE_PROBE_LOCATION_LOOKUP_METHOD_TYPE_FUNCTION_DEFAULT , LTTNG_USERSPACE_PROBE_LOCATION_LOOKUP_METHOD_TYPE_FUNCTION_ELF , LTTNG_USERSPACE_PROBE_LOCATION_LOOKUP_METHOD_TYPE_TRACEPOINT_SDT , LTTNG_USERSPACE_PROBE_LOCATION_LOOKUP_METHOD_TYPE_UNKNOWN } |
| Linux user space probe location lookup method type. More... | |
| enum | lttng_userspace_probe_location_status { LTTNG_USERSPACE_PROBE_LOCATION_STATUS_OK , LTTNG_USERSPACE_PROBE_LOCATION_STATUS_INVALID } |
| Return type of Linux user space probe location API functions. More... | |
| enum | lttng_userspace_probe_location_type { LTTNG_USERSPACE_PROBE_LOCATION_TYPE_FUNCTION , LTTNG_USERSPACE_PROBE_LOCATION_TYPE_TRACEPOINT , LTTNG_USERSPACE_PROBE_LOCATION_TYPE_UNKNOWN } |
| Linux user space probe location type. More... | |
Functions | |
| void | lttng_userspace_probe_location_destroy (struct lttng_userspace_probe_location *location) |
Destroys the Linux user space probe location location. | |
| struct lttng_userspace_probe_location * | lttng_userspace_probe_location_function_create (const char *binary_path, const char *function_name, struct lttng_userspace_probe_location_lookup_method *lookup_method) |
Creates a Linux user space probe location at the entry of the function named function_name within the binary binary_path using the lookup method lookup_method. | |
| int | lttng_userspace_probe_location_function_get_binary_fd (const struct lttng_userspace_probe_location *location) |
Returns the file descriptor of the target binary of the function Linux user space probe location location. | |
| const char * | lttng_userspace_probe_location_function_get_binary_path (const struct lttng_userspace_probe_location *location) |
Returns the binary path of the function Linux user space probe location location. | |
| const char * | lttng_userspace_probe_location_function_get_function_name (const struct lttng_userspace_probe_location *location) |
Returns the function name of the function Linux user space probe location location. | |
| const struct lttng_userspace_probe_location_lookup_method * | lttng_userspace_probe_location_get_lookup_method (const struct lttng_userspace_probe_location *location) |
Returns the lookup method of the Linux user space probe location location. | |
| enum lttng_userspace_probe_location_type | lttng_userspace_probe_location_get_type (const struct lttng_userspace_probe_location *location) |
Returns the type of the Linux user space probe location location. | |
| void | lttng_userspace_probe_location_lookup_method_destroy (struct lttng_userspace_probe_location_lookup_method *lookup_method) |
Destroys the Linux user space probe location lookup method lookup_method. | |
| struct lttng_userspace_probe_location_lookup_method * | lttng_userspace_probe_location_lookup_method_function_elf_create (void) |
| Creates an Executable and Linkable Format (ELF) Linux user space probe location lookup method. | |
| enum lttng_userspace_probe_location_lookup_method_type | lttng_userspace_probe_location_lookup_method_get_type (const struct lttng_userspace_probe_location_lookup_method *lookup_method) |
Returns the type of the Linux user space probe location lookup method lookup_method. | |
| struct lttng_userspace_probe_location_lookup_method * | lttng_userspace_probe_location_lookup_method_tracepoint_sdt_create (void) |
| Creates an USDT probe Linux user space probe location lookup method. | |
| struct lttng_userspace_probe_location * | lttng_userspace_probe_location_tracepoint_create (const char *binary_path, const char *probe_name, const char *provider_name, struct lttng_userspace_probe_location_lookup_method *lookup_method) |
Creates a Linux user space probe location at the USDT probe named probe_name, for the provider named provider_name, within the binary binary_path using the lookup method lookup_method. | |
| int | lttng_userspace_probe_location_tracepoint_get_binary_fd (const struct lttng_userspace_probe_location *location) |
Returns the file descriptor of the target binary of the USDT Linux user space probe location location. | |
| const char * | lttng_userspace_probe_location_tracepoint_get_binary_path (const struct lttng_userspace_probe_location *location) |
Returns the binary path of the USDT Linux user space probe location location. | |
| const char * | lttng_userspace_probe_location_tracepoint_get_probe_name (const struct lttng_userspace_probe_location *location) |
Returns the probe name of the USDT Linux user space probe location location. | |
| const char * | lttng_userspace_probe_location_tracepoint_get_provider_name (const struct lttng_userspace_probe_location *location) |
Returns the provider name of the USDT Linux user space probe location location. | |
A Linux user space probe location is an object which locates a Linux user space probe.
The purpose of such an object is to provide the location of the target Linux user space probe when you create:
The two ways to locate a Linux user space probe are:
| Location type | Location enumerator | Creation function |
|---|---|---|
| By the entry of a user space function within some binary | LTTNG_USERSPACE_PROBE_LOCATION_TYPE_FUNCTION | lttng_userspace_probe_location_function_create() |
| By a SystemTap Userland Statically Defined Tracing (USDT) probe within some binary | LTTNG_USERSPACE_PROBE_LOCATION_TYPE_TRACEPOINT | lttng_userspace_probe_location_tracepoint_create() |
Get the type of a Linux kprobe location with lttng_userspace_probe_location_get_type().
Destroy a Linux kprobe location with lttng_userspace_probe_location_destroy().
Linux user space probe location lookup method type.
Get the type of a Linux user space probe location lookup method with lttng_userspace_probe_location_lookup_method_get_type().
Linux user space probe location type.
Get the type of a Linux user space probe location with lttng_userspace_probe_location_get_type().
| Enumerator | |
|---|---|
| LTTNG_USERSPACE_PROBE_LOCATION_TYPE_FUNCTION | Function. |
| LTTNG_USERSPACE_PROBE_LOCATION_TYPE_TRACEPOINT | USDT probe. |
| LTTNG_USERSPACE_PROBE_LOCATION_TYPE_UNKNOWN | Unknown (error). |
|
extern |
Destroys the Linux user space probe location location.
| [in] | location | Linux user space probe location to destroy. May be |
|
extern |
Creates a Linux user space probe location at the entry of the function named function_name within the binary binary_path using the lookup method lookup_method.
This function opens binary_path and keeps the file open. Get the resulting file descriptor with lttng_userspace_probe_location_function_get_binary_fd().
| [in] | binary_path | Path to the binary containing the function named function_name to locate (copied). |
| [in] | function_name | Name of the function within binary_path to locate (copied). |
| [in] | lookup_method | Lookup method (ownership moved to the returned location on success). |
Linux user space probe location with the type LTTNG_USERSPACE_PROBE_LOCATION_TYPE_FUNCTION on success, or NULL on error.
Destroy the returned location with lttng_userspace_probe_location_destroy().
binary_path is not NULL.function_name is not NULL.lookup_method is not NULL.lookup_method has the type LTTNG_USERSPACE_PROBE_LOCATION_LOOKUP_METHOD_TYPE_FUNCTION_ELF.
|
extern |
Returns the file descriptor of the target binary of the function Linux user space probe location location.
| [in] | location | Function Linux user space probe location of which to get the binary file descriptor. |
location, or -1 on error.location is not NULL.location has the type LTTNG_USERSPACE_PROBE_LOCATION_TYPE_FUNCTION.
|
extern |
Returns the binary path of the function Linux user space probe location location.
| [in] | location | Function Linux user space probe location of which to get the binary path. |
Binary path of location, or NULL on error.
location owns the returned string.
The returned string remains valid as long as location exists.
location is not NULL.location has the type LTTNG_USERSPACE_PROBE_LOCATION_TYPE_FUNCTION.
|
extern |
Returns the function name of the function Linux user space probe location location.
| [in] | location | Function Linux user space probe location of which to get the function name. |
Function name of location, or NULL on error.
location owns the returned string.
The returned string remains valid as long as location exists.
location is not NULL.location has the type LTTNG_USERSPACE_PROBE_LOCATION_TYPE_FUNCTION.
|
extern |
Returns the lookup method of the Linux user space probe location location.
| [in] | location | Linux user space probe location of which to get the lookup method. |
Lookup method of location, or NULL on error.
location owns the returned object.
The returned object remains valid as long as location exists.
location is not NULL.
|
extern |
Returns the type of the Linux user space probe location location.
| [in] | location | Linux user space probe location of which to get the type. |
location.location is not NULL.
|
extern |
Destroys the Linux user space probe location lookup method lookup_method.
| [in] | lookup_method | Linux user space probe location lookup method to destroy. May be |
|
extern |
Creates an Executable and Linkable Format (ELF) Linux user space probe location lookup method.
ELF Linux user space probe location lookup method with the type LTTNG_USERSPACE_PROBE_LOCATION_LOOKUP_METHOD_TYPE_FUNCTION_ELF on success, or NULL on error.
Destroy the returned lookup method with lttng_userspace_probe_location_lookup_method_destroy().
|
extern |
Returns the type of the Linux user space probe location lookup method lookup_method.
| [in] | lookup_method | Linux user space probe location lookup method of which to get the type. |
lookup_method.lookup_method is not NULL.
|
extern |
Creates an USDT probe Linux user space probe location lookup method.
USDT Linux user space probe location lookup method with the type LTTNG_USERSPACE_PROBE_LOCATION_LOOKUP_METHOD_TYPE_TRACEPOINT_SDT on success, or NULL on error.
Destroy the returned lookup method with lttng_userspace_probe_location_lookup_method_destroy().
|
extern |
Creates a Linux user space probe location at the USDT probe named probe_name, for the provider named provider_name, within the binary binary_path using the lookup method lookup_method.
This function opens binary_path and keeps the file open. Get the resulting file descriptor with lttng_userspace_probe_location_tracepoint_get_binary_fd().
| [in] | binary_path | Path to the binary containing the USDT probe to locate (copied). |
| [in] | probe_name | Name of the USDT probe to locate within binary_path (copied). |
| [in] | provider_name | Name of the provider of the USDT probe to locate within binary_path (copied). |
| [in] | lookup_method | Lookup method (ownership moved to the returned location on success). |
Linux user space probe location with the type LTTNG_USERSPACE_PROBE_LOCATION_TYPE_TRACEPOINT on success, or NULL on error.
Destroy the returned location with lttng_userspace_probe_location_destroy().
binary_path is not NULL.probe_name is not NULL.provider_name is not NULL.lookup_method is not NULL.lookup_method has the type LTTNG_USERSPACE_PROBE_LOCATION_LOOKUP_METHOD_TYPE_TRACEPOINT_SDT.
|
extern |
Returns the file descriptor of the target binary of the USDT Linux user space probe location location.
| [in] | location | USDT Linux user space probe location of which to get the binary file descriptor. |
location, or -1 on error.location is not NULL.location has the type LTTNG_USERSPACE_PROBE_LOCATION_TYPE_TRACEPOINT.
|
extern |
Returns the binary path of the USDT Linux user space probe location location.
| [in] | location | USDT Linux user space probe location of which to get the binary path. |
Binary path of location, or NULL on error.
location owns the returned string.
The returned string remains valid as long as location exists.
location is not NULL.location has the type LTTNG_USERSPACE_PROBE_LOCATION_TYPE_TRACEPOINT.
|
extern |
Returns the probe name of the USDT Linux user space probe location location.
| [in] | location | USDT Linux user space probe location of which to get the probe name. |
Probe name of location, or NULL on error.
location owns the returned string.
The returned string remains valid as long as location exists.
location is not NULL.location has the type LTTNG_USERSPACE_PROBE_LOCATION_TYPE_TRACEPOINT.
|
extern |
Returns the provider name of the USDT Linux user space probe location location.
| [in] | location | USDT Linux user space probe location of which to get the provider name. |
Probe name of location, or NULL on error.
location owns the returned string.
The returned string remains valid as long as location exists.
location is not NULL.location has the type LTTNG_USERSPACE_PROBE_LOCATION_TYPE_TRACEPOINT.