#include "aligner-lib.h"
-int main(int argc, char **argv)
+int main(void)
{
align_query("molecule-foo");
#include "aligner-lib.h"
#include "tester-lib.h"
-int main(int argc, char **argv)
+int main(void)
{
/* Generate alignment */
align_query("moleculeX");
#define TRACEPOINT_DEFINE
#include "sample_component_provider.h"
-int main(int argc, char **argv)
+int main(void)
{
int i = 0;
#include <unistd.h>
#include "sample_tracepoint.h"
-int main(int argc, char **argv)
+int main(void)
{
int i = 0;
#include "ust_tests_hello.h"
static
-void inthandler(int sig)
+void inthandler(int sig __attribute__((unused)))
{
printf("in SIGUSR1 handler\n");
tracepoint(ust_tests_hello, tptest_sighandler);
unsigned int lttng_ust_lib_ring_buffer_align(size_t align_drift, size_t size_of_type)
lttng_ust_notrace;
static inline
-unsigned int lttng_ust_lib_ring_buffer_align(size_t align_drift, size_t size_of_type)
+unsigned int lttng_ust_lib_ring_buffer_align(size_t align_drift __attribute__((unused)),
+ size_t size_of_type __attribute__((unused)))
{
/*
* On architectures with efficient unaligned memory access, the content
#include <urcu/compiler.h>
#include "counter-types.h"
-static inline int lttng_counter_validate_indexes(const struct lib_counter_config *config,
- struct lib_counter *counter,
- const size_t *dimension_indexes)
+static inline int lttng_counter_validate_indexes(
+ const struct lib_counter_config *config __attribute__((unused)),
+ struct lib_counter *counter,
+ const size_t *dimension_indexes)
{
size_t nr_dimensions = counter->nr_dimensions, i;
}
-static inline size_t lttng_counter_get_index(const struct lib_counter_config *config,
- struct lib_counter *counter,
- const size_t *dimension_indexes)
+static inline size_t lttng_counter_get_index(
+ const struct lib_counter_config *config __attribute__((unused)),
+ struct lib_counter *counter,
+ const size_t *dimension_indexes)
{
size_t nr_dimensions = counter->nr_dimensions, i;
size_t index = 0;
return dimension->max_nr_elem;
}
-static int lttng_counter_init_stride(const struct lib_counter_config *config,
- struct lib_counter *counter)
+static int lttng_counter_init_stride(
+ const struct lib_counter_config *config __attribute__((unused)),
+ struct lib_counter *counter)
{
size_t nr_dimensions = counter->nr_dimensions;
size_t stride = 1;
static
int validate_args(const struct lib_counter_config *config,
- size_t nr_dimensions,
+ size_t nr_dimensions __attribute__((unused)),
const size_t *max_nr_elem,
int64_t global_sum_step,
int global_counter_fd,
}
int ustcomm_recv_stream_from_sessiond(int sock,
- uint64_t *memory_map_size,
+ uint64_t *memory_map_size __attribute__((unused)),
int *shm_fd, int *wakeup_fd)
{
ssize_t len;
return 0;
}
-int ustctl_calibrate(int sock, struct lttng_ust_abi_calibrate *calibrate)
+int ustctl_calibrate(int sock __attribute__((unused)),
+ struct lttng_ust_abi_calibrate *calibrate)
{
if (!calibrate)
return -EINVAL;
static
struct lttng_ust_client_lib_ring_buffer_client_cb *get_client_cb(
- struct lttng_ust_lib_ring_buffer *buf,
+ struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_channel *chan)
{
const struct lttng_ust_lib_ring_buffer_config *config;
void __cyg_profile_func_exit(void *this_fn, void *call_site)
__attribute__((no_instrument_function));
-void __cyg_profile_func_enter(void *this_fn, void *call_site)
+void __cyg_profile_func_enter(void *this_fn, void *call_site __attribute__((unused)))
{
tracepoint(lttng_ust_cyg_profile_fast, func_entry, this_fn);
}
-void __cyg_profile_func_exit(void *this_fn, void *call_site)
+void __cyg_profile_func_exit(void *this_fn, void *call_site __attribute__((unused)))
{
tracepoint(lttng_ust_cyg_profile_fast, func_exit, this_fn);
}
* so we create and register a corresponding provider on the C side.
*/
JNIEXPORT jlong JNICALL Java_org_lttng_ust_agent_context_LttngContextApi_registerProvider(JNIEnv *env,
- jobject jobj,
+ jobject jobj __attribute__((unused)),
jstring provider_name)
{
jboolean iscopy;
* Called from the Java side when an application unregisters a context retriever,
* so we unregister and delete the corresponding provider on the C side.
*/
-JNIEXPORT void JNICALL Java_org_lttng_ust_agent_context_LttngContextApi_unregisterProvider(JNIEnv *env,
- jobject jobj,
+JNIEXPORT void JNICALL Java_org_lttng_ust_agent_context_LttngContextApi_unregisterProvider(JNIEnv *env __attribute__((unused)),
+ jobject jobj __attribute__((unused)),
jlong provider_ref)
{
struct lttng_ust_context_provider *provider =
* Deprecated function from before the context information was passed.
*/
JNIEXPORT void JNICALL Java_org_lttng_ust_agent_jul_LttngJulApi_tracepoint(JNIEnv *env,
- jobject jobj,
+ jobject jobj __attribute__((unused)),
jstring msg,
jstring logger_name,
jstring class_name,
* Tracepoint used by Java applications using the JUL handler.
*/
JNIEXPORT void JNICALL Java_org_lttng_ust_agent_jul_LttngJulApi_tracepointWithContext(JNIEnv *env,
- jobject jobj,
+ jobject jobj __attribute__((unused)),
jstring msg,
jstring logger_name,
jstring class_name,
* Deprecated function from before the context information was passed.
*/
JNIEXPORT void JNICALL Java_org_lttng_ust_agent_log4j_LttngLog4jApi_tracepoint(JNIEnv *env,
- jobject jobj,
+ jobject jobj __attribute__((unused)),
jstring msg,
jstring logger_name,
jstring class_name,
* Tracepoint used by Java applications using the log4j handler.
*/
JNIEXPORT void JNICALL Java_org_lttng_ust_agent_log4j_LttngLog4jApi_tracepointWithContext(JNIEnv *env,
- jobject jobj,
+ jobject jobj __attribute__((unused)),
jstring msg,
jstring logger_name,
jstring class_name,
#include "lttng_ust_java.h"
JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointInt(JNIEnv *env,
- jobject jobj,
+ jobject jobj __attribute__((unused)),
jstring ev_name,
jint payload)
{
}
JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointIntInt(JNIEnv *env,
- jobject jobj,
+ jobject jobj __attribute__((unused)),
jstring ev_name,
jint payload1,
jint payload2)
}
JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointLong(JNIEnv *env,
- jobject jobj,
+ jobject jobj __attribute__((unused)),
jstring ev_name,
jlong payload)
{
}
JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointLongLong(JNIEnv *env,
- jobject jobj,
+ jobject jobj __attribute__((unused)),
jstring ev_name,
jlong payload1,
jlong payload2)
}
JNIEXPORT void JNICALL Java_org_lttng_ust_LTTngUst_tracepointString(JNIEnv *env,
- jobject jobj,
+ jobject jobj __attribute__((unused)),
jstring ev_name,
jstring payload)
{
void ust_malloc_spin_lock(pthread_mutex_t *lock)
__attribute__((unused));
static
-void ust_malloc_spin_lock(pthread_mutex_t *lock)
+void ust_malloc_spin_lock(pthread_mutex_t *lock __attribute__((unused)))
{
/*
* The memory barrier within cmpxchg takes care of ordering
void ust_malloc_spin_unlock(pthread_mutex_t *lock)
__attribute__((unused));
static
-void ust_malloc_spin_unlock(pthread_mutex_t *lock)
+void ust_malloc_spin_unlock(pthread_mutex_t *lock __attribute__((unused)))
{
/*
* Ensure memory accesses within the critical section do not
}
static
-void static_free(void *ptr)
+void static_free(void *ptr __attribute__((unused)))
{
/* no-op. */
}
}
static
-int stack_star_glob_match(struct estack *stack, int top, const char *cmp_type)
+int stack_star_glob_match(struct estack *stack, int top,
+ const char *cmp_type __attribute__((unused)))
{
const char *pattern;
const char *candidate;
}
static
-int stack_strcmp(struct estack *stack, int top, const char *cmp_type)
+int stack_strcmp(struct estack *stack, int top, const char *cmp_type __attribute__((unused)))
{
const char *p = estack_bx(stack, top)->u.s.str, *q = estack_ax(stack, top)->u.s.str;
int ret;
return diff;
}
-int lttng_bytecode_interpret_error(struct lttng_ust_bytecode_runtime *bytecode_runtime,
- const char *stack_data,
- void *ctx)
+int lttng_bytecode_interpret_error(
+ struct lttng_ust_bytecode_runtime *bytecode_runtime __attribute__((unused)),
+ const char *stack_data __attribute__((unused)),
+ void *ctx __attribute__((unused)))
{
return LTTNG_UST_BYTECODE_INTERPRETER_ERROR;
}
*/
int lttng_ust_interpret_event_filter(struct lttng_ust_event_common *event,
const char *interpreter_stack_data,
- void *event_filter_ctx)
+ void *event_filter_ctx __attribute__((unused)))
{
struct lttng_ust_bytecode_runtime *filter_bc_runtime;
struct cds_list_head *filter_bytecode_runtime_head = &event->priv->filter_bytecode_runtime_head;
* (unknown), negative error value on error.
*/
static
-int bin_op_bitwise_check(struct vstack *stack, bytecode_opcode_t opcode,
+int bin_op_bitwise_check(struct vstack *stack,
+ bytecode_opcode_t opcode __attribute__((unused)),
const char *str)
{
if (unlikely(!vstack_ax(stack) || !vstack_bx(stack)))
* <0: error
*/
static
-int validate_instruction_context(struct bytecode_runtime *bytecode,
+int validate_instruction_context(
+ struct bytecode_runtime *bytecode __attribute__((unused)),
struct vstack *stack,
char *start_pc,
char *pc)
* <0: error
*/
static
-int exec_insn(struct bytecode_runtime *bytecode,
+int exec_insn(struct bytecode_runtime *bytecode __attribute__((unused)),
struct lttng_ust_lfht *merge_points,
struct vstack *stack,
char **_next_pc,
static
int apply_field_reloc(const struct lttng_ust_event_desc *event_desc,
struct bytecode_runtime *runtime,
- uint32_t runtime_len,
+ uint32_t runtime_len __attribute__((unused)),
uint32_t reloc_offset,
const char *field_name,
enum bytecode_op bytecode_op)
static
int apply_context_reloc(struct bytecode_runtime *runtime,
- uint32_t runtime_len,
+ uint32_t runtime_len __attribute__((unused)),
uint32_t reloc_offset,
const char *context_name,
enum bytecode_op bytecode_op)
}
static
-size_t cgroup_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t cgroup_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void cgroup_ns_record(struct lttng_ust_ctx_field *field,
+void cgroup_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void cgroup_ns_get_value(struct lttng_ust_ctx_field *field,
+void cgroup_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_cgroup_ns();
#include "context-internal.h"
static
-size_t cpu_id_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t cpu_id_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void cpu_id_record(struct lttng_ust_ctx_field *field,
+void cpu_id_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void cpu_id_get_value(struct lttng_ust_ctx_field *field,
+void cpu_id_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = lttng_ust_get_cpu();
#include "context-internal.h"
static
-size_t ip_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t ip_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void ip_record(struct lttng_ust_ctx_field *field,
+void ip_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-size_t ipc_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t ipc_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void ipc_ns_record(struct lttng_ust_ctx_field *field,
+void ipc_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void ipc_ns_get_value(struct lttng_ust_ctx_field *field,
+void ipc_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_ipc_ns();
}
static
-size_t mnt_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t mnt_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void mnt_ns_record(struct lttng_ust_ctx_field *field,
+void mnt_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void mnt_ns_get_value(struct lttng_ust_ctx_field *field,
+void mnt_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_mnt_ns();
}
static
-size_t net_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t net_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void net_ns_record(struct lttng_ust_ctx_field *field,
+void net_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void net_ns_get_value(struct lttng_ust_ctx_field *field,
+void net_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_net_ns();
}
static
-size_t perf_counter_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t perf_counter_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-size_t pid_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t pid_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void pid_ns_record(struct lttng_ust_ctx_field *field,
+void pid_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void pid_ns_get_value(struct lttng_ust_ctx_field *field,
+void pid_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_pid_ns();
}
static
-size_t procname_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t procname_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset __attribute__((unused)))
{
return LTTNG_UST_ABI_PROCNAME_LEN;
}
static
-void procname_record(struct lttng_ust_ctx_field *field,
+void procname_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void procname_get_value(struct lttng_ust_ctx_field *field,
+void procname_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.str = wrapper_getprocname();
#include "context-internal.h"
static
-size_t pthread_id_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t pthread_id_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void pthread_id_record(struct lttng_ust_ctx_field *field,
+void pthread_id_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void pthread_id_get_value(struct lttng_ust_ctx_field *field,
+void pthread_id_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = (unsigned long) pthread_self();
}
static
-size_t time_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t time_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void time_ns_record(struct lttng_ust_ctx_field *field,
+void time_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void time_ns_get_value(struct lttng_ust_ctx_field *field,
+void time_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_time_ns();
}
static
-size_t user_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t user_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void user_ns_record(struct lttng_ust_ctx_field *field,
+void user_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void user_ns_get_value(struct lttng_ust_ctx_field *field,
+void user_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_user_ns();
}
static
-size_t uts_ns_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t uts_ns_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void uts_ns_record(struct lttng_ust_ctx_field *field,
+void uts_ns_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void uts_ns_get_value(struct lttng_ust_ctx_field *field,
+void uts_ns_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_uts_ns();
}
static
-size_t vegid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vegid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void vegid_record(struct lttng_ust_ctx_field *field,
+void vegid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void vegid_get_value(struct lttng_ust_ctx_field *field,
+void vegid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_vegid();
}
static
-size_t veuid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t veuid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void veuid_record(struct lttng_ust_ctx_field *field,
+void veuid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void veuid_get_value(struct lttng_ust_ctx_field *field,
+void veuid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_veuid();
}
static
-size_t vgid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vgid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void vgid_record(struct lttng_ust_ctx_field *field,
+void vgid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void vgid_get_value(struct lttng_ust_ctx_field *field,
+void vgid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_vgid();
}
static
-size_t vpid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vpid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void vpid_record(struct lttng_ust_ctx_field *field,
+void vpid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void vpid_get_value(struct lttng_ust_ctx_field *field,
+void vpid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = wrapper_getvpid();
}
static
-size_t vsgid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vsgid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void vsgid_record(struct lttng_ust_ctx_field *field,
+void vsgid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void vsgid_get_value(struct lttng_ust_ctx_field *field,
+void vsgid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_vsgid();
}
static
-size_t vsuid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vsuid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void vsuid_record(struct lttng_ust_ctx_field *field,
+void vsuid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void vsuid_get_value(struct lttng_ust_ctx_field *field,
+void vsuid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_vsuid();
}
static
-size_t vtid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vtid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void vtid_record(struct lttng_ust_ctx_field *field,
+void vtid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void vtid_get_value(struct lttng_ust_ctx_field *field,
+void vtid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = wrapper_getvtid();
}
static
-size_t vuid_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t vuid_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
}
static
-void vuid_record(struct lttng_ust_ctx_field *field,
+void vuid_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
}
static
-void vuid_get_value(struct lttng_ust_ctx_field *field,
+void vuid_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->u.s64 = get_vuid();
}
}
-int lttng_event_enabler_attach_context(struct lttng_event_enabler *enabler,
- struct lttng_ust_abi_context *context_param)
+int lttng_event_enabler_attach_context(
+ struct lttng_event_enabler *enabler __attribute__((unused)),
+ struct lttng_ust_abi_context *context_param __attribute__((unused)))
{
return -ENOSYS;
}
asm volatile ("" : : "m" (URCU_TLS(private_ctx_stack)));
}
-static inline uint64_t lib_ring_buffer_clock_read(struct lttng_ust_lib_ring_buffer_channel *chan)
+static inline uint64_t lib_ring_buffer_clock_read(
+ struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)))
{
return trace_clock_read64();
}
* contains.
*/
static __inline__
-size_t record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer_channel *chan,
- size_t offset,
- size_t *pre_header_padding,
- struct lttng_ust_lib_ring_buffer_ctx *ctx,
- struct lttng_client_ctx *client_ctx)
+size_t record_header_size(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer_channel *chan,
+ size_t offset,
+ size_t *pre_header_padding,
+ struct lttng_ust_lib_ring_buffer_ctx *ctx,
+ struct lttng_client_ctx *client_ctx)
{
struct lttng_ust_channel_buffer *lttng_chan = channel_get_private(chan);
size_t orig_offset = offset;
header->ctx.events_discarded = records_lost;
}
-static int client_buffer_create(struct lttng_ust_lib_ring_buffer *buf, void *priv,
- int cpu, const char *name, struct lttng_ust_shm_handle *handle)
+static int client_buffer_create(
+ struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
+ void *priv __attribute__((unused)),
+ int cpu __attribute__((unused)),
+ const char *name __attribute__((unused)),
+ struct lttng_ust_shm_handle *handle __attribute__((unused)))
{
return 0;
}
-static void client_buffer_finalize(struct lttng_ust_lib_ring_buffer *buf, void *priv, int cpu, struct lttng_ust_shm_handle *handle)
+static void client_buffer_finalize(
+ struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
+ void *priv __attribute__((unused)),
+ int cpu __attribute__((unused)),
+ struct lttng_ust_shm_handle *handle __attribute__((unused)))
{
}
-static void client_content_size_field(const struct lttng_ust_lib_ring_buffer_config *config,
- size_t *offset, size_t *length)
+static void client_content_size_field(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ size_t *offset, size_t *length)
{
*offset = offsetof(struct packet_header, ctx.content_size);
*length = sizeof(((struct packet_header *) NULL)->ctx.content_size);
}
-static void client_packet_size_field(const struct lttng_ust_lib_ring_buffer_config *config,
- size_t *offset, size_t *length)
+static void client_packet_size_field(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ size_t *offset, size_t *length)
{
*offset = offsetof(struct packet_header, ctx.packet_size);
*length = sizeof(((struct packet_header *) NULL)->ctx.packet_size);
return 0;
}
-static int client_stream_id(struct lttng_ust_lib_ring_buffer *buf,
+static int client_stream_id(struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_channel *chan,
uint64_t *stream_id)
{
return 0;
}
-static int client_current_timestamp(struct lttng_ust_lib_ring_buffer *buf,
+static int client_current_timestamp(
+ struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_channel *chan,
uint64_t *ts)
{
}
static int client_instance_id(struct lttng_ust_lib_ring_buffer *buf,
- struct lttng_ust_lib_ring_buffer_channel *chan,
+ struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)),
uint64_t *id)
{
*id = buf->backend.cpu;
/* No nested use supported for metadata ring buffer. */
static DEFINE_URCU_TLS(struct lttng_ust_lib_ring_buffer_ctx_private, private_ctx);
-static inline uint64_t lib_ring_buffer_clock_read(struct lttng_ust_lib_ring_buffer_channel *chan)
+static inline uint64_t lib_ring_buffer_clock_read(
+ struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)))
{
return 0;
}
static inline
-size_t record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer_channel *chan,
- size_t offset,
- size_t *pre_header_padding,
- struct lttng_ust_lib_ring_buffer_ctx *ctx,
- void *client_ctx)
+size_t record_header_size(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)),
+ size_t offset __attribute__((unused)),
+ size_t *pre_header_padding __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer_ctx *ctx __attribute__((unused)),
+ void *client_ctx __attribute__((unused)))
{
return 0;
}
#include "../libringbuffer/api.h"
#include "lttng-rb-clients.h"
-static uint64_t client_ring_buffer_clock_read(struct lttng_ust_lib_ring_buffer_channel *chan)
+static uint64_t client_ring_buffer_clock_read(
+ struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)))
{
return 0;
}
static
-size_t client_record_header_size(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer_channel *chan,
- size_t offset,
- size_t *pre_header_padding,
- struct lttng_ust_lib_ring_buffer_ctx *ctx,
- void *client_ctx)
+size_t client_record_header_size(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)),
+ size_t offset __attribute__((unused)),
+ size_t *pre_header_padding __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer_ctx *ctx __attribute__((unused)),
+ void *client_ctx __attribute__((unused)))
{
return 0;
}
return offsetof(struct metadata_packet_header, header_end);
}
-static void client_buffer_begin(struct lttng_ust_lib_ring_buffer *buf, uint64_t tsc,
- unsigned int subbuf_idx,
- struct lttng_ust_shm_handle *handle)
+static void client_buffer_begin(struct lttng_ust_lib_ring_buffer *buf,
+ uint64_t tsc __attribute__((unused)),
+ unsigned int subbuf_idx,
+ struct lttng_ust_shm_handle *handle)
{
struct lttng_ust_lib_ring_buffer_channel *chan = shmp(handle, buf->backend.chan);
struct metadata_packet_header *header =
* offset is assumed to never be 0 here : never deliver a completely empty
* subbuffer. data_size is between 1 and subbuf_size.
*/
-static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf, uint64_t tsc,
- unsigned int subbuf_idx, unsigned long data_size,
- struct lttng_ust_shm_handle *handle)
+static void client_buffer_end(struct lttng_ust_lib_ring_buffer *buf,
+ uint64_t tsc __attribute__((unused)),
+ unsigned int subbuf_idx, unsigned long data_size,
+ struct lttng_ust_shm_handle *handle)
{
struct lttng_ust_lib_ring_buffer_channel *chan = shmp(handle, buf->backend.chan);
struct metadata_packet_header *header =
WARN_ON_ONCE(records_lost != 0);
}
-static int client_buffer_create(struct lttng_ust_lib_ring_buffer *buf, void *priv,
- int cpu, const char *name,
- struct lttng_ust_shm_handle *handle)
+static int client_buffer_create(
+ struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
+ void *priv __attribute__((unused)),
+ int cpu __attribute__((unused)),
+ const char *name __attribute__((unused)),
+ struct lttng_ust_shm_handle *handle __attribute__((unused)))
{
return 0;
}
-static void client_buffer_finalize(struct lttng_ust_lib_ring_buffer *buf,
- void *priv, int cpu,
- struct lttng_ust_shm_handle *handle)
+static void client_buffer_finalize(
+ struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
+ void *priv __attribute__((unused)),
+ int cpu __attribute__((unused)),
+ struct lttng_ust_shm_handle *handle __attribute__((unused)))
{
}
}
static
-long lttng_abi_tracer_version(int objd,
+long lttng_abi_tracer_version(int objd __attribute__((unused)),
struct lttng_ust_abi_tracer_version *v)
{
v->major = LTTNG_UST_MAJOR_VERSION;
}
static
-long lttng_abi_add_context(int objd,
+long lttng_abi_add_context(int objd __attribute__((unused)),
struct lttng_ust_abi_context *context_param,
union lttng_ust_abi_args *uargs,
struct lttng_ust_ctx **ctx, struct lttng_ust_session *session)
static
long lttng_event_notifier_enabler_cmd(int objd, unsigned int cmd, unsigned long arg,
- union lttng_ust_abi_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs __attribute__((unused)),
+ void *owner __attribute__((unused)))
{
struct lttng_event_notifier_enabler *event_notifier_enabler = objd_private(objd);
switch (cmd) {
*/
static
long lttng_event_notifier_group_error_counter_cmd(int objd, unsigned int cmd, unsigned long arg,
- union lttng_ust_abi_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs, void *owner __attribute__((unused)))
{
int ret;
struct lttng_counter *counter = objd_private(objd);
static
long lttng_tracepoint_list_cmd(int objd, unsigned int cmd, unsigned long arg,
- union lttng_ust_abi_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs __attribute__((unused)),
+ void *owner __attribute__((unused)))
{
struct lttng_ust_tracepoint_list *list = objd_private(objd);
struct lttng_ust_abi_tracepoint_iter *tp =
static
long lttng_tracepoint_field_list_cmd(int objd, unsigned int cmd,
- unsigned long arg, union lttng_ust_abi_args *uargs, void *owner)
+ unsigned long arg __attribute__((unused)), union lttng_ust_abi_args *uargs,
+ void *owner __attribute__((unused)))
{
struct lttng_ust_field_list *list = objd_private(objd);
struct lttng_ust_abi_field_iter *tp = &uargs->field_list.entry;
static
int lttng_abi_map_stream(int channel_objd, struct lttng_ust_abi_stream *info,
- union lttng_ust_abi_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs, void *owner __attribute__((unused)))
{
struct lttng_ust_channel_buffer *lttng_chan_buf = objd_private(channel_objd);
int ret;
*/
static
long lttng_event_enabler_cmd(int objd, unsigned int cmd, unsigned long arg,
- union lttng_ust_abi_args *uargs, void *owner)
+ union lttng_ust_abi_args *uargs __attribute__((unused)),
+ void *owner __attribute__((unused)))
{
struct lttng_event_enabler *enabler = objd_private(objd);
}
static
-void trace_start_cb(struct lttng_ust_session *session, void *priv)
+void trace_start_cb(struct lttng_ust_session *session, void *priv __attribute__((unused)))
{
tracepoint(lttng_ust_statedump, start, session);
}
static
-void trace_end_cb(struct lttng_ust_session *session, void *priv)
+void trace_end_cb(struct lttng_ust_session *session, void *priv __attribute__((unused)))
{
tracepoint(lttng_ust_statedump, end, session);
}
}
static
-int extract_bin_info_events(struct dl_phdr_info *info, size_t size, void *_data)
+int extract_bin_info_events(struct dl_phdr_info *info, size_t size __attribute__((unused)), void *_data)
{
int j, ret = 0;
struct dl_iterate_data *data = _data;
#else
static
-void lttng_ust_lfht_iter_debug_set_ht(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_iter *iter)
+void lttng_ust_lfht_iter_debug_set_ht(struct lttng_ust_lfht *ht __attribute__((unused)),
+ struct lttng_ust_lfht_iter *iter __attribute__((unused)))
{
}
iter->next = next;
}
-void lttng_ust_lfht_next_duplicate(struct lttng_ust_lfht *ht, lttng_ust_lfht_match_fct match,
+void lttng_ust_lfht_next_duplicate(struct lttng_ust_lfht *ht __attribute__((unused)),
+ lttng_ust_lfht_match_fct match,
const void *key, struct lttng_ust_lfht_iter *iter)
{
struct lttng_ust_lfht_node *node, *next;
iter->next = next;
}
-void lttng_ust_lfht_next(struct lttng_ust_lfht *ht, struct lttng_ust_lfht_iter *iter)
+void lttng_ust_lfht_next(struct lttng_ust_lfht *ht __attribute__((unused)),
+ struct lttng_ust_lfht_iter *iter)
{
struct lttng_ust_lfht_node *node, *next;
* (detection of memory corruption).
*/
static inline
-void lttng_ust_lfht_node_init(struct lttng_ust_lfht_node *node)
+void lttng_ust_lfht_node_init(struct lttng_ust_lfht_node *node __attribute__((unused)))
{
}
return NULL;
}
-size_t lttng_ust_dummy_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t lttng_ust_dummy_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)),
+ size_t offset)
{
size_t size = 0;
return size;
}
-void lttng_ust_dummy_record(struct lttng_ust_ctx_field *field,
+void lttng_ust_dummy_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
chan->ops->event_write(ctx, &sel_char, sizeof(sel_char), lttng_ust_rb_alignof(sel_char));
}
-void lttng_ust_dummy_get_value(struct lttng_ust_ctx_field *field,
+void lttng_ust_dummy_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
value->sel = LTTNG_UST_DYNAMIC_TYPE_NONE;
char *dest, const char *src, size_t len)
__attribute__((always_inline));
static inline
-size_t lib_ring_buffer_do_strcpy(const struct lttng_ust_lib_ring_buffer_config *config,
+size_t lib_ring_buffer_do_strcpy(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
char *dest, const char *src, size_t len)
{
size_t count;
* bits are identical, else 0.
*/
static inline
-int subbuffer_id_compare_offset(const struct lttng_ust_lib_ring_buffer_config *config,
- unsigned long id, unsigned long offset)
+int subbuffer_id_compare_offset(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ unsigned long id, unsigned long offset)
{
return (id & SB_ID_OFFSET_MASK) == (offset << SB_ID_OFFSET_SHIFT);
}
/* Get backend pages from cache. */
static inline
struct lttng_ust_lib_ring_buffer_backend_pages *
- lib_ring_buffer_get_backend_pages_from_ctx(const struct lttng_ust_lib_ring_buffer_config *config,
+ lib_ring_buffer_get_backend_pages_from_ctx(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx)
{
return ctx->priv->backend_pages;
}
#else /* LTTNG_RING_BUFFER_COUNT_EVENTS */
static inline
-void subbuffer_count_record(const struct lttng_ust_lib_ring_buffer_config *config,
- const struct lttng_ust_lib_ring_buffer_ctx *ctx,
- struct lttng_ust_lib_ring_buffer_backend *bufb,
- unsigned long idx, struct lttng_ust_shm_handle *handle)
+void subbuffer_count_record(const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ const struct lttng_ust_lib_ring_buffer_ctx *ctx __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer_backend *bufb __attribute__((unused)),
+ unsigned long idx __attribute__((unused)),
+ struct lttng_ust_shm_handle *handle __attribute__((unused)))
{
}
#endif /* #else LTTNG_RING_BUFFER_COUNT_EVENTS */
}
static inline
-void subbuffer_inc_packet_count(const struct lttng_ust_lib_ring_buffer_config *config,
+void subbuffer_inc_packet_count(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_backend *bufb,
unsigned long idx, struct lttng_ust_shm_handle *handle)
{
static inline
int update_read_sb_index(const struct lttng_ust_lib_ring_buffer_config *config,
struct lttng_ust_lib_ring_buffer_backend *bufb,
- struct channel_backend *chanb,
+ struct channel_backend *chanb __attribute__((unused)),
unsigned long consumed_idx,
unsigned long consumed_count,
struct lttng_ust_shm_handle *handle)
}
static inline
-unsigned long lib_ring_buffer_get_consumed(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer *buf)
+unsigned long lib_ring_buffer_get_consumed(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer *buf)
{
return uatomic_read(&buf->consumed);
}
* ordering enforced with respect to trace teardown).
*/
static inline
-int lib_ring_buffer_is_finalized(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer *buf)
+int lib_ring_buffer_is_finalized(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer *buf)
{
int finalized = CMM_ACCESS_ONCE(buf->finalized);
/*
* section.
*/
static inline
-int lib_ring_buffer_nesting_inc(const struct lttng_ust_lib_ring_buffer_config *config)
+int lib_ring_buffer_nesting_inc(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)))
{
int nesting;
}
static inline
-int lib_ring_buffer_nesting_count(const struct lttng_ust_lib_ring_buffer_config *config)
+int lib_ring_buffer_nesting_count(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)))
{
return URCU_TLS(lib_ring_buffer_nesting);
}
static inline
-void lib_ring_buffer_nesting_dec(const struct lttng_ust_lib_ring_buffer_config *config)
+void lib_ring_buffer_nesting_dec(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)))
{
cmm_barrier();
URCU_TLS(lib_ring_buffer_nesting)--; /* TLS */
* disabled, for RING_BUFFER_SYNC_PER_CPU configuration.
*/
static inline
-void lib_ring_buffer_switch(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer *buf, enum switch_mode mode,
- struct lttng_ust_shm_handle *handle)
+void lib_ring_buffer_switch(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer *buf, enum switch_mode mode,
+ struct lttng_ust_shm_handle *handle)
{
lib_ring_buffer_switch_slow(buf, mode, handle);
}
}
static inline
-void channel_record_disable(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer_channel *chan)
+void channel_record_disable(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer_channel *chan)
{
uatomic_inc(&chan->record_disabled);
}
static inline
-void channel_record_enable(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer_channel *chan)
+void channel_record_enable(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer_channel *chan)
{
uatomic_dec(&chan->record_disabled);
}
static inline
-void lib_ring_buffer_record_disable(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer *buf)
+void lib_ring_buffer_record_disable(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer *buf)
{
uatomic_inc(&buf->record_disabled);
}
static inline
-void lib_ring_buffer_record_enable(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer *buf)
+void lib_ring_buffer_record_enable(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer *buf)
{
uatomic_dec(&buf->record_disabled);
}
* useful for crash dump.
*/
static inline
-void lib_ring_buffer_write_commit_counter(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer *buf,
- struct lttng_ust_lib_ring_buffer_channel *chan,
- unsigned long buf_offset,
- unsigned long commit_count,
- struct lttng_ust_shm_handle *handle,
- struct commit_counters_hot *cc_hot)
+void lib_ring_buffer_write_commit_counter(
+ const struct lttng_ust_lib_ring_buffer_config *config,
+ struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer_channel *chan,
+ unsigned long buf_offset,
+ unsigned long commit_count,
+ struct lttng_ust_shm_handle *handle __attribute__((unused)),
+ struct commit_counters_hot *cc_hot)
{
unsigned long commit_seq_old;
static
int lib_ring_buffer_backend_allocate(const struct lttng_ust_lib_ring_buffer_config *config,
struct lttng_ust_lib_ring_buffer_backend *bufb,
- size_t size, size_t num_subbuf,
+ size_t size __attribute__((unused)), size_t num_subbuf,
int extra_reader_sb,
struct lttng_ust_shm_handle *handle,
struct shm_object *shmobj)
*
* Destroy all channel buffers and frees the channel.
*/
-void channel_backend_free(struct channel_backend *chanb,
- struct lttng_ust_shm_handle *handle)
+void channel_backend_free(struct channel_backend *chanb __attribute__((unused)),
+ struct lttng_ust_shm_handle *handle __attribute__((unused)))
{
/* SHM teardown takes care of everything */
}
}
static
-void lib_ring_buffer_channel_switch_timer(int sig, siginfo_t *si, void *uc)
+void lib_ring_buffer_channel_switch_timer(int sig __attribute__((unused)),
+ siginfo_t *si, void *uc __attribute__((unused)))
{
const struct lttng_ust_lib_ring_buffer_config *config;
struct lttng_ust_shm_handle *handle;
}
static
-void lib_ring_buffer_channel_read_timer(int sig, siginfo_t *si, void *uc)
+void lib_ring_buffer_channel_read_timer(int sig __attribute__((unused)),
+ siginfo_t *si, void *uc __attribute__((unused)))
{
struct lttng_ust_lib_ring_buffer_channel *chan;
}
static
-void *sig_thread(void *arg)
+void *sig_thread(void *arg __attribute__((unused)))
{
sigset_t mask;
siginfo_t info;
}
static void channel_unregister_notifiers(struct lttng_ust_lib_ring_buffer_channel *chan,
- struct lttng_ust_shm_handle *handle)
+ struct lttng_ust_shm_handle *handle __attribute__((unused)))
{
lib_ring_buffer_channel_switch_timer_stop(chan);
lib_ring_buffer_channel_read_timer_stop(chan);
size_t priv_data_size,
void *priv_data_init,
void *priv,
- void *buf_addr, size_t subbuf_size,
+ void *buf_addr __attribute__((unused)), size_t subbuf_size,
size_t num_subbuf, unsigned int switch_timer_interval,
unsigned int read_timer_interval,
const int *stream_fds, int nr_stream_fds,
return shmp(handle, chan->backend.buf[cpu].shmp);
}
-int ring_buffer_channel_close_wait_fd(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer_channel *chan,
- struct lttng_ust_shm_handle *handle)
+int ring_buffer_channel_close_wait_fd(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)),
+ struct lttng_ust_shm_handle *handle)
{
struct shm_ref *ref;
return shm_close_wait_fd(handle, ref);
}
-int ring_buffer_channel_close_wakeup_fd(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer_channel *chan,
- struct lttng_ust_shm_handle *handle)
+int ring_buffer_channel_close_wakeup_fd(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer_channel *chan __attribute__((unused)),
+ struct lttng_ust_shm_handle *handle)
{
struct shm_ref *ref;
}
int lib_ring_buffer_open_read(struct lttng_ust_lib_ring_buffer *buf,
- struct lttng_ust_shm_handle *handle)
+ struct lttng_ust_shm_handle *handle __attribute__((unused)))
{
if (uatomic_cmpxchg(&buf->active_readers, 0, 1) != 0)
return -EBUSY;
}
#else /* LTTNG_RING_BUFFER_COUNT_EVENTS */
static
-void deliver_count_events(const struct lttng_ust_lib_ring_buffer_config *config,
- struct lttng_ust_lib_ring_buffer *buf,
- unsigned long idx,
- struct lttng_ust_shm_handle *handle)
+void deliver_count_events(
+ const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)),
+ struct lttng_ust_lib_ring_buffer *buf __attribute__((unused)),
+ unsigned long idx __attribute__((unused)),
+ struct lttng_ust_shm_handle *handle __attribute__((unused)))
{
}
#endif /* #else LTTNG_RING_BUFFER_COUNT_EVENTS */
unsigned long commit_count,
unsigned long idx,
struct lttng_ust_shm_handle *handle,
- uint64_t tsc)
+ uint64_t tsc __attribute__((unused)))
{
unsigned long old_commit_count = commit_count
- chan->backend.subbuf_size;
unsigned int switch_timer_interval,
unsigned int read_timer_interval)
lttng_ust_notrace;
+
static inline
int lib_ring_buffer_check_config(const struct lttng_ust_lib_ring_buffer_config *config,
unsigned int switch_timer_interval,
- unsigned int read_timer_interval)
+ unsigned int read_timer_interval __attribute__((unused)))
{
if (config->alloc == RING_BUFFER_ALLOC_GLOBAL
&& config->sync == RING_BUFFER_SYNC_PER_CPU
* Non-atomic decrement. Only used by reader, apply to reader-owned subbuffer.
*/
static inline
-void _v_dec(const struct lttng_ust_lib_ring_buffer_config *config, union v_atomic *v_a)
+void _v_dec(const struct lttng_ust_lib_ring_buffer_config *config __attribute__((unused)), union v_atomic *v_a)
{
--v_a->v;
}
static
-void *function(void *arg)
+void *function(void *arg __attribute__((unused)))
{
unsigned long long nr_loops = 0;
struct thread_counter *thread_counter = arg;
#include "ust_tests_hello.h"
static
-void inthandler(int sig)
+void inthandler(int sig __attribute__((unused)))
{
printf("in SIGUSR1 handler\n");
tracepoint(ust_tests_hello, tptest_sighandler);
#include "ust_tests_hello.h"
static
-void inthandler(int sig)
+void inthandler(int sig __attribute__((unused)))
{
printf("in SIGUSR1 handler\n");
tracepoint(ust_tests_hello, tptest_sighandler);
}
static
-size_t test_get_size(struct lttng_ust_ctx_field *field, size_t offset)
+size_t test_get_size(struct lttng_ust_ctx_field *field __attribute__((unused)), size_t offset)
{
int sel = test_count % _NR_LTTNG_UST_DYNAMIC_TYPES;
size_t size = 0;
}
static
-void test_record(struct lttng_ust_ctx_field *field,
+void test_record(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *lttng_chan_buf)
{
}
static
-void test_get_value(struct lttng_ust_ctx_field *field,
+void test_get_value(struct lttng_ust_ctx_field *field __attribute__((unused)),
struct lttng_ust_ctx_value *value)
{
int sel = test_count % _NR_LTTNG_UST_DYNAMIC_TYPES;
};
static
-void inthandler(int sig)
+void inthandler(int sig __attribute__((unused)))
{
printf("in SIGUSR1 handler\n");
tracepoint(ust_tests_hello, tptest_sighandler);
lttng_msgpack_writer_fini(&writer);
}
-int main(int argc, char *argv[])
+int main(void)
{
uint8_t buf[BUFFER_SIZE] = {0};
double arr_double[] = {1.1, 2.3, -12345.2};