[lttng-dev] Question: multiple cft_integer for one argument?

changz zheng.chang at emc.com
Tue Jul 10 04:06:48 EDT 2012


Hi,

I found an interesting thing when I went thru lttng-ust samples:

In lttng-ust/tests/hello/ust_tests_hello.h, here is definition of an event:

  28  TRACEPOINT_EVENT(ust_tests_hello, tptest,
  29     TP_ARGS(int, anint, int, netint, long *, values,
  30         char *, text, size_t, textlen,
  31         double, doublearg, float, floatarg,
  32         bool, boolarg),
  33     TP_FIELDS(
  34         ctf_integer(int, intfield, anint)
  35         ctf_integer_hex(int, intfield2, anint)
  36         ctf_integer(long, longfield, anint)
  37         ctf_integer_network(int, netintfield, netint)
  38         ctf_integer_network_hex(int, netintfieldhex, netint)
  39         ctf_array(long, arrfield1, values, 3)
  40         ctf_array_text(char, arrfield2, text, 10)
  41         ctf_sequence(char, seqfield1, text,
  42                  size_t, textlen)
  43         ctf_sequence_text(char, seqfield2, text,
  44                  size_t, textlen)
  45         ctf_string(stringfield, text)
  46         ctf_float(float, floatfield, floatarg)
  47         ctf_float(double, doublefield, doublearg)
  48         ctf_integer(bool, boolfield, boolarg)
  49     )
  50 )

Please notice line 34-36. With my understanding, it decides the output 
format of each argument.
Why does the argument anint  need three cft_integer with different types?

Best Regards
Zheng



More information about the lttng-dev mailing list