* TP_ARGS() is valid to mean no arguments
* TP_ARGS( void ) is valid too
*/
- TP_ARGS(char *, text),
+ TP_ARGS(const char *, text),
/*
* TP_FIELDS describes how to write the fields of the trace event.
* You can use the args here
TRACEPOINT_EVENT(
sample_tracepoint,
message, // C++ Style comment
- TP_ARGS(char *, text),
+ TP_ARGS(const char *, text),
TP_FIELDS(
ctf_string(message, text)
)
static DEFINE_URCU_TLS(int, procname_nesting);
static inline
-char *wrapper_getprocname(void)
+const char *wrapper_getprocname(void)
{
int nesting = CMM_LOAD_SHARED(URCU_TLS(procname_nesting));
struct lttng_ust_lib_ring_buffer_ctx *ctx,
struct lttng_ust_channel_buffer *chan)
{
- char *procname;
+ const char *procname;
procname = wrapper_getprocname();
chan->ops->event_write(ctx, procname, LTTNG_UST_ABI_PROCNAME_LEN, 1);
};
struct lttng_transport {
- char *name;
+ const char *name;
struct cds_list_head node;
struct lttng_ust_channel_buffer_ops ops;
const struct lttng_ust_lib_ring_buffer_config *client_config;
};
struct lttng_counter_transport {
- char *name;
+ const char *name;
struct cds_list_head node;
struct lttng_counter_ops ops;
const struct lib_counter_config *client_config;
#include "fvwrite.h"
#include "various.h"
+static char null_str[] = "(null)";
+static char bad_base_str[] = "bug in ust_safe_vfprintf: bad base";
+
union arg {
int intarg;
unsigned int uintarg;
goto nosign;
case 's':
if ((cp = GETARG(char *)) == NULL)
- cp = "(null)";
+ cp = null_str;
if (prec >= 0) {
/*
* can't use strlen; can only look for the
break;
default:
- cp = "bug in ust_safe_vfprintf: bad base";
+ cp = bad_base_str;
size = strlen(cp);
goto skipsize;
}
}
}
+static char myprovider_name[] = "$app.myprovider";
struct lttng_ust_context_provider myprovider = {
.struct_size = sizeof(struct lttng_ust_context_provider),
- .name = "$app.myprovider",
+ .name = myprovider_name,
.get_size = test_get_size,
.record = test_record,
.get_value = test_get_value,