Project

General

Profile

Feature #508 » 0001-test-array-of-floats-in-hello.cxx.patch

Sébastien Barthélémy, 04/19/2013 04:33 PM

View differences:

tests/hello.cxx/hello.cpp
int i, netint;
long values[] = { 1, 2, 3 };
char text[10] = "test";
double dbl = 2.0;
float flt = 2222.0;
double dbl = 2.1;
float flt = 2222.1;
int delay = 0;
float fltarr[] = { 1.1, 2.2, 3.3 };
init_int_handler();
......
for (i = 0; i < 1000000; i++) {
netint = htonl(i);
tracepoint(ust_tests_hello, tptest, i, netint, values,
text, strlen(text), dbl, flt);
text, strlen(text), dbl, flt, fltarr);
//usleep(100000);
}
fprintf(stderr, " done.\n");
tests/hello.cxx/ust_tests_hello.h
TRACEPOINT_EVENT(ust_tests_hello, tptest,
TP_ARGS(int, anint, int, netint, long *, values,
char *, text, size_t, textlen,
double, doublearg, float, floatarg),
double, doublearg, float, floatarg,
float *, floatarrarg),
TP_FIELDS(
ctf_integer(int, intfield, anint)
ctf_integer_hex(int, intfield2, anint)
......
ctf_string(stringfield, text)
ctf_float(float, floatfield, floatarg)
ctf_float(double, doublefield, doublearg)
ctf_array(float, floatarrfield, floatarrarg, 3)
)
)
(1-1/2)