*
*/
-/**
+/*
* @file modprobe.c
*
* @brief modprobe related functions.
#ifdef HAVE_KMOD
#include <libkmod.h>
-/**
+/*
* @brief Logging function for libkmod integration.
*/
static ATTR_FORMAT_PRINTF(6, 0) void log_kmod(void *data __attribute__((unused)),
free(str);
}
-/**
+/*
* @brief Setup the libkmod context.
*
* Create the context, add a custom logging function and preload the
return ret;
}
-/**
+/*
* @brief Loads the kernel modules in \p modules
*
* @param modules List of modules to load
return ret;
}
-/**
+/*
* @brief Recursively unload modules.
*
* This function implements the same modules unloading behavior as
return ret;
}
-/**
+/*
* @brief Unloads the kernel modules in \p modules
*
* @param modules List of modules to unload
return modprobe_lttng(kern_modules_control_core, ARRAY_SIZE(kern_modules_control_core));
}
-/**
+/*
* Grow global list of probes (double capacity or set it to 1 if
* currently 0 and copy existing data).
*/
#include <lttng/domain.h>
-/**
+/*
* Event handling function shall only return an error if
* the thread should be stopped.
*/
sem_t ready;
};
-/**
+/*
* This thread maintains an internal state associating clients and triggers.
*
* In order to speed-up and simplify queries, hash tables providing the
std::unique_lock<std::mutex> lock_session_list();
namespace exceptions {
-/**
+/*
* @class session_not_found_error
* @brief Represents a session-not-found error and provides the parameters used to query the session
* for use by error-reporting code.
#define lttng_align_floor(v, align) __lttng_align_floor_mask(v, (__typeof__(v)) (align) -1)
-/**
+/*
* lttng_offset_align - Calculate the offset needed to align an object on its natural
* alignment towards higher addresses.
* @align_drift: object offset from an "alignment"-aligned address.
(((alignment) - (align_drift)) & ((alignment) -1)); \
})
-/**
+/*
* lttng_offset_align_floor - Calculate the offset needed to align an object
* on its natural alignment towards lower addresses.
* @align_drift: object offset from an "alignment"-aligned address.
size_t size;
};
-/**
+/*
* Return a buffer view referencing a subset of the memory referenced by a raw
* pointer.
*
*/
struct lttng_buffer_view lttng_buffer_view_init(const char *src, size_t offset, ptrdiff_t len);
-/**
+/*
* Checks if a buffer view is safe to access.
*
* After calling the buffer view creation functions, callers should verify
*/
bool lttng_buffer_view_is_valid(const struct lttng_buffer_view *view);
-/**
+/*
* Return a buffer view referencing a subset of the memory referenced by another
* view.
*
struct lttng_buffer_view
lttng_buffer_view_from_view(const struct lttng_buffer_view *src, size_t offset, ptrdiff_t len);
-/**
+/*
* Return a buffer view referencing a subset of the memory referenced by a
* dynamic buffer.
*
struct lttng_buffer_view lttng_buffer_view_from_dynamic_buffer(
const struct lttng_dynamic_buffer *src, size_t offset, ptrdiff_t len);
-/**
+/*
* Verify that `buf` contains a string starting at `str` of length
* `len_with_null_terminator`.
*
#define LTTNG_BUILD_BUG_ON(condition) ((void) sizeof(char[-!!(condition)]))
-/**
+/*
* LTTNG_BUILD_RUNTIME_BUG_ON - check condition at build (if constant) or runtime
* @condition: the condition which should be false.
*
throw lttng::invalid_argument_error(msg, LTTNG_SOURCE_LOCATION())
namespace lttng {
-/**
+/*
* @class source_location
* @brief Represents the location in the source code where an exception was thrown.
*
unsigned int line_number;
};
-/**
+/*
* @class runtime_error
* @brief Base type for all LTTng exceptions.
*
lttng::source_location source_location;
};
-/**
+/*
* @class allocation_failure
* @brief Represents an allocation failure.
*
std::size_t allocation_size;
};
-/**
+/*
* @class out_of_range
* @brief Represents an out of range access error.
*
const lttng::source_location& source_location);
};
-/**
+/*
* @class unsupported_error
* @brief Represents an error for unsupported features.
*
};
namespace ctl {
-/**
+/*
* @class error
* @brief Wraps lttng_error_code errors for reporting through liblttng-ctl's interface.
*
};
} /* namespace ctl */
-/**
+/*
* @class posix_error
* @brief Wraps a POSIX system error, including the location where the error occurred.
*/
const lttng::source_location& source_location);
};
-/**
+/*
* @class communication_error
* @brief Base class for communication errors between components.
*/
const lttng::source_location& source_location);
};
-/**
+/*
* @class protocol_error
* @brief Base class for protocol layer communication errors (encoding or decoding problems).
*/
const lttng::source_location& source_location);
};
-/**
+/*
* @class invalid_argument_error
* @brief Represents an error for invalid arguments.
*/
} _iterator;
};
-/**
+/*
* Checks if a payload view's buffer is safe to access.
*
* After calling the payload view creation functions, callers should verify
*/
bool lttng_payload_view_is_valid(const struct lttng_payload_view *view);
-/**
+/*
* Return a payload view referencing a subset of a payload.
*
* @payload Source payload to reference
struct lttng_payload_view
lttng_payload_view_from_payload(const struct lttng_payload *payload, size_t offset, ptrdiff_t len);
-/**
+/*
* Return a payload view referencing a subset of a payload referenced by
* another payload view.
*
struct lttng_payload_view
lttng_payload_view_from_view(struct lttng_payload_view *view, size_t offset, ptrdiff_t len);
-/**
+/*
* Return a payload view referencing a subset of a dynamic buffer.
*
* Meant as an adapter for code paths that need to create a payload view
*/
struct lttng_payload_view lttng_payload_view_from_dynamic_buffer(
const struct lttng_dynamic_buffer *buffer, size_t offset, ptrdiff_t len);
-/**
+/*
*
* Return a payload view referencing a subset of a dynamic buffer.
*
size_t offset,
ptrdiff_t len);
-/**
+/*
* Return a payload view referencing a subset of the memory referenced by a raw
* pointer.
*
struct lttng_payload_view
lttng_payload_view_init_from_buffer(const char *src, size_t offset, ptrdiff_t len);
-/**
+/*
* Get the number of file descriptor handles left in a payload view.
*
* @payload Payload instance
*/
int lttng_payload_view_get_fd_handle_count(const struct lttng_payload_view *payload_view);
-/**
+/*
* Pop an fd handle from a payload view.
*
* A reference to the returned fd_handle is acquired on behalf of the caller.
*/
void lttng_payload_clear(struct lttng_payload *payload);
-/**
+/*
* Add an fd to the payload.
* The payload acquires a reference to the fd_handle.
*
return ret;
}
-/**
+/*
* Parse a string that represents a size in human readable format. It
* supports decimal integers suffixed by 'k', 'K', 'M' or 'G'.
*
return ret;
}
-/**
+/*
* Parse a string that represents a time in human readable format. It
* supports decimal integers suffixed by:
* "us" for microsecond,
return fls_u64(x - 1);
}
-/**
+/*
* Obtain the value of LTTNG_HOME environment variable, if exists.
* Otherwise returns the value of HOME.
*/
return val;
}
-/**
+/*
* Get user's home directory. Dynamically allocated, must be freed
* by the caller.
*/
-/**
+/*
* Copyright (C) 2023 Kienan Stewart <kstewart@efficios.com>
*
* SPDX-License-Identifier: LGPL-2.1-only
-/**
+/*
* Copyright (C) 2023 Kienan Stewart <kstewart@efficios.com>
*
* SPDX-License-Identifier: LGPL-2.1-only
-/**
+/*
* Copyright (C) 2023 Kienan Stewart <kstewart@efficios.com>
*
* SPDX-License-Identifier: LGPL-2.1-only
#include <sys/types.h>
#include <unistd.h>
-/**
+/*
* The process waits for the creation of a file passed as argument from an
* external processes to execute a syscall and exiting. This is useful for tests
* in combinaison with LTTng's PID tracker feature where we can trace the kernel
static int node_exist;
static bool result = false;
-/**
+/*
* print_xpath_nodes:
* nodes: the nodes set.
* output: the output file handle.