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
70 70
	int i, netint;
71 71
	long values[] = { 1, 2, 3 };
72 72
	char text[10] = "test";
73
	double dbl = 2.0;
74
	float flt = 2222.0;
73
	double dbl = 2.1;
74
	float flt = 2222.1;
75 75
	int delay = 0;
76
	float fltarr[] = { 1.1, 2.2, 3.3 };
76 77

  
77 78
	init_int_handler();
78 79

  
......
87 88
	for (i = 0; i < 1000000; i++) {
88 89
		netint = htonl(i);
89 90
		tracepoint(ust_tests_hello, tptest, i, netint, values,
90
			   text, strlen(text), dbl, flt);
91
			   text, strlen(text), dbl, flt, fltarr);
91 92
		//usleep(100000);
92 93
	}
93 94
	fprintf(stderr, " done.\n");
tests/hello.cxx/ust_tests_hello.h
31 31
TRACEPOINT_EVENT(ust_tests_hello, tptest,
32 32
	TP_ARGS(int, anint, int, netint, long *, values,
33 33
		 char *, text, size_t, textlen,
34
		 double, doublearg, float, floatarg),
34
		 double, doublearg, float, floatarg,
35
		 float *, floatarrarg),
35 36
	TP_FIELDS(
36 37
		ctf_integer(int, intfield, anint)
37 38
		ctf_integer_hex(int, intfield2, anint)
......
47 48
		ctf_string(stringfield, text)
48 49
		ctf_float(float, floatfield, floatarg)
49 50
		ctf_float(double, doublefield, doublearg)
51
		ctf_array(float, floatarrfield, floatarrarg, 3)
50 52
	)
51 53
)
52 54

  
(1-1/2)