projects
/
lttng-ust.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix: all functions have declarations (-Wmissing-prototypes -Wold-style-definition)
[lttng-ust.git]
/
tests
/
compile
/
test-app-ctx
/
hello.c
diff --git
a/tests/compile/test-app-ctx/hello.c
b/tests/compile/test-app-ctx/hello.c
index 6b1a6bd30251058abc2c20773c39e8cd1b9f2b87..c08fa8dd0347eef348aa0ebafa389796d9397264 100644
(file)
--- a/
tests/compile/test-app-ctx/hello.c
+++ b/
tests/compile/test-app-ctx/hello.c
@@
-35,6
+35,7
@@
struct mmsghdr;
static __thread unsigned int test_count;
static __thread unsigned int test_count;
+static
void test_inc_count(void)
{
test_count++;
void test_inc_count(void)
{
test_count++;
@@
-46,49
+47,49
@@
size_t test_get_size(struct lttng_ust_ctx_field *field, size_t offset)
int sel = test_count % _NR_LTTNG_UST_DYNAMIC_TYPES;
size_t size = 0;
int sel = test_count % _NR_LTTNG_UST_DYNAMIC_TYPES;
size_t size = 0;
- size += l
ib_ring_buffer_align(offset, lttng
_alignof(char));
+ size += l
ttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb
_alignof(char));
size += sizeof(char); /* tag */
switch (sel) {
case LTTNG_UST_DYNAMIC_TYPE_NONE:
break;
case LTTNG_UST_DYNAMIC_TYPE_S8:
size += sizeof(char); /* tag */
switch (sel) {
case LTTNG_UST_DYNAMIC_TYPE_NONE:
break;
case LTTNG_UST_DYNAMIC_TYPE_S8:
- size += l
ib_ring_buffer_align(offset, lttng
_alignof(int8_t));
+ size += l
ttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb
_alignof(int8_t));
size += sizeof(int8_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_S16:
size += sizeof(int8_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_S16:
- size += l
ib_ring_buffer_align(offset, lttng
_alignof(int16_t));
+ size += l
ttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb
_alignof(int16_t));
size += sizeof(int16_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_S32:
size += sizeof(int16_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_S32:
- size += l
ib_ring_buffer_align(offset, lttng
_alignof(int32_t));
+ size += l
ttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb
_alignof(int32_t));
size += sizeof(int32_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_S64:
size += sizeof(int32_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_S64:
- size += l
ib_ring_buffer_align(offset, lttng
_alignof(int64_t));
+ size += l
ttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb
_alignof(int64_t));
size += sizeof(int64_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_U8:
size += sizeof(int64_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_U8:
- size += l
ib_ring_buffer_align(offset, lttng
_alignof(uint8_t));
+ size += l
ttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb
_alignof(uint8_t));
size += sizeof(uint8_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_U16:
size += sizeof(uint8_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_U16:
- size += l
ib_ring_buffer_align(offset, lttng
_alignof(uint16_t));
+ size += l
ttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb
_alignof(uint16_t));
size += sizeof(uint16_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_U32:
size += sizeof(uint16_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_U32:
- size += l
ib_ring_buffer_align(offset, lttng
_alignof(uint32_t));
+ size += l
ttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb
_alignof(uint32_t));
size += sizeof(uint32_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_U64:
size += sizeof(uint32_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_U64:
- size += l
ib_ring_buffer_align(offset, lttng
_alignof(uint64_t));
+ size += l
ttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb
_alignof(uint64_t));
size += sizeof(uint64_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_FLOAT:
size += sizeof(uint64_t); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_FLOAT:
- size += l
ib_ring_buffer_align(offset, lttng
_alignof(float));
+ size += l
ttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb
_alignof(float));
size += sizeof(float); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_DOUBLE:
size += sizeof(float); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_DOUBLE:
- size += l
ib_ring_buffer_align(offset, lttng
_alignof(double));
+ size += l
ttng_ust_lib_ring_buffer_align(offset, lttng_ust_rb
_alignof(double));
size += sizeof(double); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_STRING:
size += sizeof(double); /* variant */
break;
case LTTNG_UST_DYNAMIC_TYPE_STRING:
@@
-109,8
+110,7
@@
void test_record(struct lttng_ust_ctx_field *field,
int sel = test_count % _NR_LTTNG_UST_DYNAMIC_TYPES;
char sel_char = (char) sel;
int sel = test_count % _NR_LTTNG_UST_DYNAMIC_TYPES;
char sel_char = (char) sel;
- lib_ring_buffer_align_ctx(ctx, lttng_alignof(char));
- lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char));
+ lttng_chan_buf->ops->event_write(ctx, &sel_char, sizeof(sel_char), lttng_ust_rb_alignof(char));
switch (sel) {
case LTTNG_UST_DYNAMIC_TYPE_NONE:
break;
switch (sel) {
case LTTNG_UST_DYNAMIC_TYPE_NONE:
break;
@@
-118,86
+118,76
@@
void test_record(struct lttng_ust_ctx_field *field,
{
int8_t v = -8;
{
int8_t v = -8;
- lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
- lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
+ lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v), lttng_ust_rb_alignof(v));
break;
}
case LTTNG_UST_DYNAMIC_TYPE_S16:
{
int16_t v = -16;
break;
}
case LTTNG_UST_DYNAMIC_TYPE_S16:
{
int16_t v = -16;
- lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
- lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
+ lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v), lttng_ust_rb_alignof(v));
break;
}
case LTTNG_UST_DYNAMIC_TYPE_S32:
{
int32_t v = -32;
break;
}
case LTTNG_UST_DYNAMIC_TYPE_S32:
{
int32_t v = -32;
- lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
- lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
+ lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v), lttng_ust_rb_alignof(v));
break;
}
case LTTNG_UST_DYNAMIC_TYPE_S64:
{
int64_t v = -64;
break;
}
case LTTNG_UST_DYNAMIC_TYPE_S64:
{
int64_t v = -64;
- lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
- lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
+ lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v), lttng_ust_rb_alignof(v));
break;
}
case LTTNG_UST_DYNAMIC_TYPE_U8:
{
uint8_t v = 8;
break;
}
case LTTNG_UST_DYNAMIC_TYPE_U8:
{
uint8_t v = 8;
- lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
- lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
+ lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v), lttng_ust_rb_alignof(v));
break;
}
case LTTNG_UST_DYNAMIC_TYPE_U16:
{
uint16_t v = 16;
break;
}
case LTTNG_UST_DYNAMIC_TYPE_U16:
{
uint16_t v = 16;
- lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
- lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
+ lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v), lttng_ust_rb_alignof(v));
break;
}
case LTTNG_UST_DYNAMIC_TYPE_U32:
{
uint32_t v = 32;
break;
}
case LTTNG_UST_DYNAMIC_TYPE_U32:
{
uint32_t v = 32;
- lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
- lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
+ lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v), lttng_ust_rb_alignof(v));
break;
}
case LTTNG_UST_DYNAMIC_TYPE_U64:
{
uint64_t v = 64;
break;
}
case LTTNG_UST_DYNAMIC_TYPE_U64:
{
uint64_t v = 64;
- lib_ring_buffer_align_ctx(ctx, lttng_alignof(v));
- lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v));
+ lttng_chan_buf->ops->event_write(ctx, &v, sizeof(v), lttng_ust_rb_alignof(v));
break;
}
case LTTNG_UST_DYNAMIC_TYPE_FLOAT:
{
float f = 22322.0;
break;
}
case LTTNG_UST_DYNAMIC_TYPE_FLOAT:
{
float f = 22322.0;
- lib_ring_buffer_align_ctx(ctx, lttng_alignof(f));
- lttng_chan_buf->ops->event_write(ctx, &f, sizeof(f));
+ lttng_chan_buf->ops->event_write(ctx, &f, sizeof(f), lttng_ust_rb_alignof(f));
break;
}
case LTTNG_UST_DYNAMIC_TYPE_DOUBLE:
{
double d = 2.0;
break;
}
case LTTNG_UST_DYNAMIC_TYPE_DOUBLE:
{
double d = 2.0;
- lib_ring_buffer_align_ctx(ctx, lttng_alignof(d));
- lttng_chan_buf->ops->event_write(ctx, &d, sizeof(d));
+ lttng_chan_buf->ops->event_write(ctx, &d, sizeof(d), lttng_ust_rb_alignof(d));
break;
}
case LTTNG_UST_DYNAMIC_TYPE_STRING:
{
const char *str = "teststr";
break;
}
case LTTNG_UST_DYNAMIC_TYPE_STRING:
{
const char *str = "teststr";
- lttng_chan_buf->ops->event_write(ctx, str, strlen(str) + 1);
+ lttng_chan_buf->ops->event_write(ctx, str, strlen(str) + 1
, 1
);
break;
}
default:
break;
}
default:
@@
-261,12
+251,14
@@
struct lttng_ust_context_provider myprovider = {
.get_value = test_get_value,
};
.get_value = test_get_value,
};
+static
void inthandler(int sig)
{
printf("in SIGUSR1 handler\n");
tracepoint(ust_tests_hello, tptest_sighandler);
}
void inthandler(int sig)
{
printf("in SIGUSR1 handler\n");
tracepoint(ust_tests_hello, tptest_sighandler);
}
+static
int init_int_handler(void)
{
int result;
int init_int_handler(void)
{
int result;
@@
-294,8
+286,6
@@
int init_int_handler(void)
return 0;
}
return 0;
}
-void test_inc_count(void);
-
int main(int argc, char **argv)
{
int i, netint;
int main(int argc, char **argv)
{
int i, netint;
This page took
0.02559 seconds
and
4
git commands to generate.