summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
59a957d)
12 files changed:
#ifndef _ASM_PPC_ATOMIC_H_
#define _ASM_PPC_ATOMIC_H_
#ifndef _ASM_PPC_ATOMIC_H_
#define _ASM_PPC_ATOMIC_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct { volatile int counter; } atomic_t;
#define ATOMIC_INIT(i) { (i) }
typedef struct { volatile int counter; } atomic_t;
#define ATOMIC_INIT(i) { (i) }
#define smp_mb__before_atomic_inc() __MB
#define smp_mb__after_atomic_inc() __MB
#define smp_mb__before_atomic_inc() __MB
#define smp_mb__after_atomic_inc() __MB
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
+
#endif /* _ASM_PPC_ATOMIC_H_ */
#endif /* _ASM_PPC_ATOMIC_H_ */
+#ifdef __cplusplus
+extern "C" {
+#endif
+
typedef struct { volatile int counter; } atomic_t;
#define ATOMIC_INIT(i) { (i) }
typedef struct { volatile int counter; } atomic_t;
#define ATOMIC_INIT(i) { (i) }
#define smp_mb__before_atomic_inc() smp_mb()
#define smp_mb__after_atomic_inc() smp_mb()
#define smp_mb__before_atomic_inc() smp_mb()
#define smp_mb__after_atomic_inc() smp_mb()
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
+
#endif /* _ASM_PPC64_ATOMIC_H_ */
#endif /* _ASM_PPC64_ATOMIC_H_ */
#ifndef _KERNELUTILS_I386_H
#define _KERNELUTILS_I386_H
#ifndef _KERNELUTILS_I386_H
#define _KERNELUTILS_I386_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// We are careful, so we assume a possibly SMP machine
#define LOCK "lock ; "
#define LOCK_PREFIX "lock ; "
// We are careful, so we assume a possibly SMP machine
#define LOCK "lock ; "
#define LOCK_PREFIX "lock ; "
(unsigned long)(n),sizeof(*(ptr))))
static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
(unsigned long)(n),sizeof(*(ptr))))
static inline unsigned long __cmpxchg(volatile void *ptr, unsigned long old,
- unsigned long new, int size)
+ unsigned long newval, int size)
{
unsigned long prev;
switch (size) {
case 1:
__asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2"
: "=a"(prev)
{
unsigned long prev;
switch (size) {
case 1:
__asm__ __volatile__(LOCK_PREFIX "cmpxchgb %b1,%2"
: "=a"(prev)
- : "q"(new), "m"(*__xg(ptr)), "0"(old)
+ : "q"(newval), "m"(*__xg(ptr)), "0"(old)
: "memory");
return prev;
case 2:
__asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2"
: "=a"(prev)
: "memory");
return prev;
case 2:
__asm__ __volatile__(LOCK_PREFIX "cmpxchgw %w1,%2"
: "=a"(prev)
- : "r"(new), "m"(*__xg(ptr)), "0"(old)
+ : "r"(newval), "m"(*__xg(ptr)), "0"(old)
: "memory");
return prev;
case 4:
__asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2"
: "=a"(prev)
: "memory");
return prev;
case 4:
__asm__ __volatile__(LOCK_PREFIX "cmpxchgl %1,%2"
: "=a"(prev)
- : "r"(new), "m"(*__xg(ptr)), "0"(old)
+ : "r"(newval), "m"(*__xg(ptr)), "0"(old)
: "memory");
return prev;
}
: "memory");
return prev;
}
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
#endif // _KERNELUTILS_I386_H
#endif // _KERNELUTILS_I386_H
#ifndef _KERNELUTILS_X86_64_H
#define _KERNELUTILS_X86_64_H
#ifndef _KERNELUTILS_X86_64_H
#define _KERNELUTILS_X86_64_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
// We are careful, so we assume a possibly SMP machine
#define LOCK "lock ; "
#define LOCK_PREFIX "lock ; "
// We are careful, so we assume a possibly SMP machine
#define LOCK "lock ; "
#define LOCK_PREFIX "lock ; "
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
#endif // _KERNELUTILS_X86_64_H
#endif // _KERNELUTILS_X86_64_H
#include <stdlib.h>
#include <stdarg.h>
#include <stdlib.h>
#include <stdarg.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
static int trace_user_generic_slow_printf(
const char *fmt, ...)
#ifndef LTT_TRACE
static int trace_user_generic_slow_printf(
const char *fmt, ...)
#ifndef LTT_TRACE
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
+
#endif //_LTT_FACILITY_CUSTOM_USER_GENERIC_H_
#endif //_LTT_FACILITY_CUSTOM_USER_GENERIC_H_
#include <ltt/ltt-facility-id-user_generic.h>
#include <ltt/ltt-usertrace.h>
#include <ltt/ltt-facility-id-user_generic.h>
#include <ltt/ltt-usertrace.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/* Named types */
/* Event string structures */
static inline void lttng_write_string_user_generic_string_data(
/* Named types */
/* Event string structures */
static inline void lttng_write_string_user_generic_string_data(
size_t *to_base,
size_t *to,
size_t *to_base,
size_t *to,
size_t *len,
const char * obj)
{
size_t *len,
const char * obj)
{
/* Event string logging function */
/* Event string logging function */
+static inline int trace_user_generic_string(
+ const char * lttng_param_data);
+
#ifndef LTT_TRACE_FAST
static inline int trace_user_generic_string(
const char * lttng_param_data)
#ifndef LTT_TRACE_FAST
static inline int trace_user_generic_string(
const char * lttng_param_data)
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t *len = &real_len;
size_t reserve_size;
size_t slot_size;
size_t *len = &real_len;
size_t reserve_size;
size_t slot_size;
- const void *real_from;
- const void **from = &real_from;
+ const char *real_from;
+ const char **from = &real_from;
/* For each field, calculate the field size. */
/* size = *to_base + *to + *len */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
/* For each field, calculate the field size. */
/* size = *to_base + *to + *len */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
- *from = lttng_param_data;
+ *from = (const char*)lttng_param_data;
lttng_write_string_user_generic_string_data(buffer, to_base, to, from, len, lttng_param_data);
reserve_size = *to_base + *to + *len;
lttng_write_string_user_generic_string_data(buffer, to_base, to, from, len, lttng_param_data);
reserve_size = *to_base + *to + *len;
*to_base = *to = *len = 0;
*to_base = *to = *len = 0;
- *from = lttng_param_data;
+ *from = (const char*)lttng_param_data;
lttng_write_string_user_generic_string_data(buffer, to_base, to, from, len, lttng_param_data);
/* Flush pending memcpy */
lttng_write_string_user_generic_string_data(buffer, to_base, to, from, len, lttng_param_data);
/* Flush pending memcpy */
unsigned int index;
struct ltt_trace_info *trace = thread_trace_info;
struct ltt_buf *ltt_buf;
unsigned int index;
struct ltt_trace_info *trace = thread_trace_info;
struct ltt_buf *ltt_buf;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t *len = &real_len;
size_t reserve_size;
size_t slot_size;
size_t *len = &real_len;
size_t reserve_size;
size_t slot_size;
- const void *real_from;
- const void **from = &real_from;
+ const char *real_from;
+ const char **from = &real_from;
uint64_t tsc;
size_t before_hdr_pad, after_hdr_pad, header_size;
uint64_t tsc;
size_t before_hdr_pad, after_hdr_pad, header_size;
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
- *from = lttng_param_data;
+ *from = (const char*)lttng_param_data;
lttng_write_string_user_generic_string_data(buffer, to_base, to, from, len, lttng_param_data);
reserve_size = *to_base + *to + *len;
lttng_write_string_user_generic_string_data(buffer, to_base, to, from, len, lttng_param_data);
reserve_size = *to_base + *to + *len;
reserve_size, before_hdr_pad, tsc);
*to_base += before_hdr_pad + after_hdr_pad + header_size;
reserve_size, before_hdr_pad, tsc);
*to_base += before_hdr_pad + after_hdr_pad + header_size;
- *from = lttng_param_data;
+ *from = (const char*)lttng_param_data;
lttng_write_string_user_generic_string_data(buffer, to_base, to, from, len, lttng_param_data);
/* Flush pending memcpy */
lttng_write_string_user_generic_string_data(buffer, to_base, to, from, len, lttng_param_data);
/* Flush pending memcpy */
/* Event string_pointer structures */
static inline void lttng_write_string_user_generic_string_pointer_string(
/* Event string_pointer structures */
static inline void lttng_write_string_user_generic_string_pointer_string(
size_t *to_base,
size_t *to,
size_t *to_base,
size_t *to,
size_t *len,
const char * obj)
{
size_t *len,
const char * obj)
{
/* Event string_pointer logging function */
/* Event string_pointer logging function */
+static inline int trace_user_generic_string_pointer(
+ const char * lttng_param_string,
+ const void * lttng_param_pointer);
+
#ifndef LTT_TRACE_FAST
static inline int trace_user_generic_string_pointer(
const char * lttng_param_string,
#ifndef LTT_TRACE_FAST
static inline int trace_user_generic_string_pointer(
const char * lttng_param_string,
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t reserve_size;
size_t slot_size;
size_t align;
size_t reserve_size;
size_t slot_size;
size_t align;
- const void *real_from;
- const void **from = &real_from;
+ const char *real_from;
+ const char **from = &real_from;
/* For each field, calculate the field size. */
/* size = *to_base + *to + *len */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
/* For each field, calculate the field size. */
/* size = *to_base + *to + *len */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
- *from = lttng_param_string;
+ *from = (const char*)lttng_param_string;
lttng_write_string_user_generic_string_pointer_string(buffer, to_base, to, from, len, lttng_param_string);
lttng_write_string_user_generic_string_pointer_string(buffer, to_base, to, from, len, lttng_param_string);
- *from = <tng_param_pointer;
+ *from = (const char*)<tng_param_pointer;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
*to_base = *to = *len = 0;
*to_base = *to = *len = 0;
- *from = lttng_param_string;
+ *from = (const char*)lttng_param_string;
lttng_write_string_user_generic_string_pointer_string(buffer, to_base, to, from, len, lttng_param_string);
/* Flush pending memcpy */
lttng_write_string_user_generic_string_pointer_string(buffer, to_base, to, from, len, lttng_param_string);
/* Flush pending memcpy */
- *from = <tng_param_pointer;
+ *from = (const char*)<tng_param_pointer;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
unsigned int index;
struct ltt_trace_info *trace = thread_trace_info;
struct ltt_buf *ltt_buf;
unsigned int index;
struct ltt_trace_info *trace = thread_trace_info;
struct ltt_buf *ltt_buf;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t reserve_size;
size_t slot_size;
size_t align;
size_t reserve_size;
size_t slot_size;
size_t align;
- const void *real_from;
- const void **from = &real_from;
+ const char *real_from;
+ const char **from = &real_from;
uint64_t tsc;
size_t before_hdr_pad, after_hdr_pad, header_size;
uint64_t tsc;
size_t before_hdr_pad, after_hdr_pad, header_size;
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
- *from = lttng_param_string;
+ *from = (const char*)lttng_param_string;
lttng_write_string_user_generic_string_pointer_string(buffer, to_base, to, from, len, lttng_param_string);
lttng_write_string_user_generic_string_pointer_string(buffer, to_base, to, from, len, lttng_param_string);
- *from = <tng_param_pointer;
+ *from = (const char*)<tng_param_pointer;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
reserve_size, before_hdr_pad, tsc);
*to_base += before_hdr_pad + after_hdr_pad + header_size;
reserve_size, before_hdr_pad, tsc);
*to_base += before_hdr_pad + after_hdr_pad + header_size;
- *from = lttng_param_string;
+ *from = (const char*)lttng_param_string;
lttng_write_string_user_generic_string_pointer_string(buffer, to_base, to, from, len, lttng_param_string);
/* Flush pending memcpy */
lttng_write_string_user_generic_string_pointer_string(buffer, to_base, to, from, len, lttng_param_string);
/* Flush pending memcpy */
- *from = <tng_param_pointer;
+ *from = (const char*)<tng_param_pointer;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
/* Event slow_printf structures */
static inline void lttng_write_string_user_generic_slow_printf_string(
/* Event slow_printf structures */
static inline void lttng_write_string_user_generic_slow_printf_string(
size_t *to_base,
size_t *to,
size_t *to_base,
size_t *to,
size_t *len,
const char * obj)
{
size_t *len,
const char * obj)
{
/* Event slow_printf logging function */
/* Event slow_printf logging function */
+static inline int trace_user_generic_slow_printf_param_buffer(
+ char *buffer,
+ size_t reserve_size);
+
#ifndef LTT_TRACE_FAST
static inline int trace_user_generic_slow_printf_param_buffer(
#ifndef LTT_TRACE_FAST
static inline int trace_user_generic_slow_printf_param_buffer(
size_t reserve_size)
#ifndef LTT_TRACE
{
size_t reserve_size)
#ifndef LTT_TRACE
{
unsigned int index;
struct ltt_trace_info *trace = thread_trace_info;
struct ltt_buf *ltt_buf;
unsigned int index;
struct ltt_trace_info *trace = thread_trace_info;
struct ltt_buf *ltt_buf;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t *len = &real_len;
size_t reserve_size;
size_t slot_size;
size_t *len = &real_len;
size_t reserve_size;
size_t slot_size;
- const void *real_from;
- const void **from = &real_from;
+ const char *real_from;
+ const char **from = &real_from;
uint64_t tsc;
size_t before_hdr_pad, after_hdr_pad, header_size;
uint64_t tsc;
size_t before_hdr_pad, after_hdr_pad, header_size;
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
- *from = lttng_param_string;
+ *from = (const char*)lttng_param_string;
lttng_write_string_user_generic_slow_printf_string(buffer, to_base, to, from, len, lttng_param_string);
reserve_size = *to_base + *to + *len;
lttng_write_string_user_generic_slow_printf_string(buffer, to_base, to, from, len, lttng_param_string);
reserve_size = *to_base + *to + *len;
reserve_size, before_hdr_pad, tsc);
*to_base += before_hdr_pad + after_hdr_pad + header_size;
reserve_size, before_hdr_pad, tsc);
*to_base += before_hdr_pad + after_hdr_pad + header_size;
- *from = lttng_param_string;
+ *from = (const char*)lttng_param_string;
lttng_write_string_user_generic_slow_printf_string(buffer, to_base, to, from, len, lttng_param_string);
/* Flush pending memcpy */
lttng_write_string_user_generic_slow_printf_string(buffer, to_base, to, from, len, lttng_param_string);
/* Flush pending memcpy */
/* Event function_entry structures */
/* Event function_entry logging function */
/* Event function_entry structures */
/* Event function_entry logging function */
static inline __attribute__((no_instrument_function)) int trace_user_generic_function_entry(
static inline __attribute__((no_instrument_function)) int trace_user_generic_function_entry(
+ const void * lttng_param_this_fn,
+ const void * lttng_param_call_site);
+
+#ifndef LTT_TRACE_FAST
+static inline int trace_user_generic_function_entry(
const void * lttng_param_this_fn,
const void * lttng_param_call_site)
#ifndef LTT_TRACE
const void * lttng_param_this_fn,
const void * lttng_param_call_site)
#ifndef LTT_TRACE
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t reserve_size;
size_t slot_size;
size_t align;
size_t reserve_size;
size_t slot_size;
size_t align;
- const void *real_from;
- const void **from = &real_from;
+ const char *real_from;
+ const char **from = &real_from;
/* For each field, calculate the field size. */
/* size = *to_base + *to + *len */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
/* For each field, calculate the field size. */
/* size = *to_base + *to + *len */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
- *from = <tng_param_this_fn;
+ *from = (const char*)<tng_param_this_fn;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
*len += sizeof(const void *);
*len += sizeof(const void *);
- *from = <tng_param_call_site;
+ *from = (const char*)<tng_param_call_site;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
*to_base = *to = *len = 0;
*to_base = *to = *len = 0;
- *from = <tng_param_this_fn;
+ *from = (const char*)<tng_param_this_fn;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
- *from = <tng_param_call_site;
+ *from = (const char*)<tng_param_call_site;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
unsigned int index;
struct ltt_trace_info *trace = thread_trace_info;
struct ltt_buf *ltt_buf;
unsigned int index;
struct ltt_trace_info *trace = thread_trace_info;
struct ltt_buf *ltt_buf;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t reserve_size;
size_t slot_size;
size_t align;
size_t reserve_size;
size_t slot_size;
size_t align;
- const void *real_from;
- const void **from = &real_from;
+ const char *real_from;
+ const char **from = &real_from;
uint64_t tsc;
size_t before_hdr_pad, after_hdr_pad, header_size;
uint64_t tsc;
size_t before_hdr_pad, after_hdr_pad, header_size;
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
- *from = <tng_param_this_fn;
+ *from = (const char*)<tng_param_this_fn;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
*len += sizeof(const void *);
*len += sizeof(const void *);
- *from = <tng_param_call_site;
+ *from = (const char*)<tng_param_call_site;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
reserve_size, before_hdr_pad, tsc);
*to_base += before_hdr_pad + after_hdr_pad + header_size;
reserve_size, before_hdr_pad, tsc);
*to_base += before_hdr_pad + after_hdr_pad + header_size;
- *from = <tng_param_this_fn;
+ *from = (const char*)<tng_param_this_fn;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
- *from = <tng_param_call_site;
+ *from = (const char*)<tng_param_call_site;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
/* Event function_exit structures */
/* Event function_exit logging function */
/* Event function_exit structures */
/* Event function_exit logging function */
static inline __attribute__((no_instrument_function)) int trace_user_generic_function_exit(
static inline __attribute__((no_instrument_function)) int trace_user_generic_function_exit(
+ const void * lttng_param_this_fn,
+ const void * lttng_param_call_site);
+
+#ifndef LTT_TRACE_FAST
+static inline int trace_user_generic_function_exit(
const void * lttng_param_this_fn,
const void * lttng_param_call_site)
#ifndef LTT_TRACE
const void * lttng_param_this_fn,
const void * lttng_param_call_site)
#ifndef LTT_TRACE
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t reserve_size;
size_t slot_size;
size_t align;
size_t reserve_size;
size_t slot_size;
size_t align;
- const void *real_from;
- const void **from = &real_from;
+ const char *real_from;
+ const char **from = &real_from;
/* For each field, calculate the field size. */
/* size = *to_base + *to + *len */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
/* For each field, calculate the field size. */
/* size = *to_base + *to + *len */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
- *from = <tng_param_this_fn;
+ *from = (const char*)<tng_param_this_fn;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
*len += sizeof(const void *);
*len += sizeof(const void *);
- *from = <tng_param_call_site;
+ *from = (const char*)<tng_param_call_site;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
*to_base = *to = *len = 0;
*to_base = *to = *len = 0;
- *from = <tng_param_this_fn;
+ *from = (const char*)<tng_param_this_fn;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
- *from = <tng_param_call_site;
+ *from = (const char*)<tng_param_call_site;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
unsigned int index;
struct ltt_trace_info *trace = thread_trace_info;
struct ltt_buf *ltt_buf;
unsigned int index;
struct ltt_trace_info *trace = thread_trace_info;
struct ltt_buf *ltt_buf;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t reserve_size;
size_t slot_size;
size_t align;
size_t reserve_size;
size_t slot_size;
size_t align;
- const void *real_from;
- const void **from = &real_from;
+ const char *real_from;
+ const char **from = &real_from;
uint64_t tsc;
size_t before_hdr_pad, after_hdr_pad, header_size;
uint64_t tsc;
size_t before_hdr_pad, after_hdr_pad, header_size;
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
- *from = <tng_param_this_fn;
+ *from = (const char*)<tng_param_this_fn;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
*len += sizeof(const void *);
*len += sizeof(const void *);
- *from = <tng_param_call_site;
+ *from = (const char*)<tng_param_call_site;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
reserve_size, before_hdr_pad, tsc);
*to_base += before_hdr_pad + after_hdr_pad + header_size;
reserve_size, before_hdr_pad, tsc);
*to_base += before_hdr_pad + after_hdr_pad + header_size;
- *from = <tng_param_this_fn;
+ *from = (const char*)<tng_param_this_fn;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
- *from = <tng_param_call_site;
+ *from = (const char*)<tng_param_call_site;
align = sizeof(const void *);
if(*len == 0) {
align = sizeof(const void *);
if(*len == 0) {
/* Event thread_brand structures */
static inline void lttng_write_string_user_generic_thread_brand_name(
/* Event thread_brand structures */
static inline void lttng_write_string_user_generic_thread_brand_name(
size_t *to_base,
size_t *to,
size_t *to_base,
size_t *to,
size_t *len,
const char * obj)
{
size_t *len,
const char * obj)
{
/* Event thread_brand logging function */
/* Event thread_brand logging function */
+static inline int trace_user_generic_thread_brand(
+ const char * lttng_param_name);
+
#ifndef LTT_TRACE_FAST
static inline int trace_user_generic_thread_brand(
const char * lttng_param_name)
#ifndef LTT_TRACE_FAST
static inline int trace_user_generic_thread_brand(
const char * lttng_param_name)
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t *len = &real_len;
size_t reserve_size;
size_t slot_size;
size_t *len = &real_len;
size_t reserve_size;
size_t slot_size;
- const void *real_from;
- const void **from = &real_from;
+ const char *real_from;
+ const char **from = &real_from;
/* For each field, calculate the field size. */
/* size = *to_base + *to + *len */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
/* For each field, calculate the field size. */
/* size = *to_base + *to + *len */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
- *from = lttng_param_name;
+ *from = (const char*)lttng_param_name;
lttng_write_string_user_generic_thread_brand_name(buffer, to_base, to, from, len, lttng_param_name);
reserve_size = *to_base + *to + *len;
lttng_write_string_user_generic_thread_brand_name(buffer, to_base, to, from, len, lttng_param_name);
reserve_size = *to_base + *to + *len;
*to_base = *to = *len = 0;
*to_base = *to = *len = 0;
- *from = lttng_param_name;
+ *from = (const char*)lttng_param_name;
lttng_write_string_user_generic_thread_brand_name(buffer, to_base, to, from, len, lttng_param_name);
/* Flush pending memcpy */
lttng_write_string_user_generic_thread_brand_name(buffer, to_base, to, from, len, lttng_param_name);
/* Flush pending memcpy */
unsigned int index;
struct ltt_trace_info *trace = thread_trace_info;
struct ltt_buf *ltt_buf;
unsigned int index;
struct ltt_trace_info *trace = thread_trace_info;
struct ltt_buf *ltt_buf;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t real_to_base = 0; /* The buffer is allocated on arch_size alignment */
size_t *to_base = &real_to_base;
size_t real_to = 0;
size_t *len = &real_len;
size_t reserve_size;
size_t slot_size;
size_t *len = &real_len;
size_t reserve_size;
size_t slot_size;
- const void *real_from;
- const void **from = &real_from;
+ const char *real_from;
+ const char **from = &real_from;
uint64_t tsc;
size_t before_hdr_pad, after_hdr_pad, header_size;
uint64_t tsc;
size_t before_hdr_pad, after_hdr_pad, header_size;
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
/* Assume that the padding for alignment starts at a
* sizeof(void *) address. */
- *from = lttng_param_name;
+ *from = (const char*)lttng_param_name;
lttng_write_string_user_generic_thread_brand_name(buffer, to_base, to, from, len, lttng_param_name);
reserve_size = *to_base + *to + *len;
lttng_write_string_user_generic_thread_brand_name(buffer, to_base, to, from, len, lttng_param_name);
reserve_size = *to_base + *to + *len;
reserve_size, before_hdr_pad, tsc);
*to_base += before_hdr_pad + after_hdr_pad + header_size;
reserve_size, before_hdr_pad, tsc);
*to_base += before_hdr_pad + after_hdr_pad + header_size;
- *from = lttng_param_name;
+ *from = (const char*)lttng_param_name;
lttng_write_string_user_generic_thread_brand_name(buffer, to_base, to, from, len, lttng_param_name);
/* Flush pending memcpy */
lttng_write_string_user_generic_thread_brand_name(buffer, to_base, to, from, len, lttng_param_name);
/* Flush pending memcpy */
#endif //LTT_TRACE
#endif //LTT_TRACE_FAST
#endif //LTT_TRACE
#endif //LTT_TRACE_FAST
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
+
#endif //_LTT_FACILITY_USER_GENERIC_H_
#endif //_LTT_FACILITY_USER_GENERIC_H_
#include <ltt/ltt-facility-id-user_generic.h>
#include <ltt/ltt-facility-id-user_generic.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#ifndef LTT_N_SUBBUFS
#define LTT_N_SUBBUFS 2
#endif //LTT_N_SUBBUFS
#ifndef LTT_N_SUBBUFS
#define LTT_N_SUBBUFS 2
#endif //LTT_N_SUBBUFS
ltt_deliver_callback(ltt_buf, SUBBUF_INDEX(offset_begin, ltt_buf), NULL);
}
}
ltt_deliver_callback(ltt_buf, SUBBUF_INDEX(offset_begin, ltt_buf), NULL);
}
}
+
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
#endif //LTT_TRACE_FAST
#endif //LTT_TRACE
#endif //LTT_TRACE_FAST
#endif //LTT_TRACE
#include <stdint.h>
#include <sys/types.h>
#include <stdint.h>
#include <sys/types.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+
#define inline inline __attribute__((always_inline))
#if defined(__powerpc__) || defined(__powerpc64__)
#define inline inline __attribute__((always_inline))
#if defined(__powerpc__) || defined(__powerpc64__)
#define ltt_register_generic(...) syscall(__NR_ltt_register_generic, __VA_ARGS__)
#define ltt_trace_generic(...) syscall(__NR_ltt_trace_generic, __VA_ARGS__)
#define ltt_register_generic(...) syscall(__NR_ltt_register_generic, __VA_ARGS__)
#define ltt_trace_generic(...) syscall(__NR_ltt_trace_generic, __VA_ARGS__)
+static inline unsigned int __attribute__((no_instrument_function))
+ ltt_align(size_t align_drift, size_t size_of_type);
+
#ifndef LTT_PACK
/* Calculate the offset needed to align the type */
#ifndef LTT_PACK
/* Calculate the offset needed to align the type */
-static inline unsigned int __attribute__((no_instrument_function))
+static inline unsigned int
ltt_align(size_t align_drift, size_t size_of_type)
{
size_t alignment = min(sizeof(void*), size_of_type);
ltt_align(size_t align_drift, size_t size_of_type)
{
size_t alignment = min(sizeof(void*), size_of_type);
}
#define LTT_ALIGN
#else
}
#define LTT_ALIGN
#else
-static inline unsigned int __attribute__((no_instrument_function))
- ltt_align(size_t align_drift,
- size_t size_of_type)
+static inline unsigned int ltt_align(size_t align_drift, size_t size_of_type)
{
return 0;
}
#define LTT_ALIGN __attribute__((packed))
#endif //LTT_PACK
{
return 0;
}
#define LTT_ALIGN __attribute__((packed))
#endif //LTT_PACK
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
+
#ifdef LTT_TRACE_FAST
#include <ltt/ltt-usertrace-fast.h>
#endif //LTT_TRACE_FAST
#endif //_LTT_USERTRACE_H
#ifdef LTT_TRACE_FAST
#include <ltt/ltt-usertrace-fast.h>
#endif //LTT_TRACE_FAST
#endif //_LTT_USERTRACE_H
* 2 of the License, or (at your option) any later version.
*/
* 2 of the License, or (at your option) any later version.
*/
+#ifndef _PPC_ASM_PPC_H
+#define _PPC_ASM_PPC_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Macros for storing registers into and loading registers from
* exception frames.
/*
* Macros for storing registers into and loading registers from
* exception frames.
#define N_RSYM 64
#define N_SLINE 68
#define N_SO 100
#define N_RSYM 64
#define N_SLINE 68
#define N_SO 100
+
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
+
+#endif //_PPC_ASM_PPC_H
#include <asm/atomic.h>
#include <asm/hw_irq.h>
#include <asm/atomic.h>
#include <asm/hw_irq.h>
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* Memory barrier.
* The sync instruction guarantees that all memory accesses initiated
/*
* Memory barrier.
* The sync instruction guarantees that all memory accesses initiated
#define arch_align_stack(x) (x)
#define arch_align_stack(x) (x)
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
+
#endif /* __PPC_SYSTEM_H */
#endif /* __PPC_SYSTEM_H */
#ifndef __PPC64_SYSTEM_H
#define __PPC64_SYSTEM_H
#ifndef __PPC64_SYSTEM_H
#define __PPC64_SYSTEM_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
/*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
#define arch_align_stack(x) (x)
#define arch_align_stack(x) (x)
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
+
#ifndef __TIMEX_PPC_H
#define __TIMEX_PPC_H
#ifndef __TIMEX_PPC_H
#define __TIMEX_PPC_H
+#ifdef __cplusplus
+extern "C" {
+#endif
+
#define CPU_FTR_601 0x00000100
#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
#define CPU_FTR_601 0x00000100
#define CLOCK_TICK_RATE 1193180 /* Underlying HZ */
+#ifdef __cplusplus
+} /* end of extern "C" */
+#endif
+