Project

General

Profile

Actions

Bug #473

closed

Can't trace long double payload field?

Added by Daniel U. Thibault about 11 years ago. Updated over 10 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
Start date:
03/12/2013
Due date:
% Done:

100%

Estimated time:

Description

Once more using lttng-ust/doc/examples/easy-ust/, I have:

sample.c

[...]
#include <unistd.h>
#include <complex.h> //for _Complex types
#define TRACEPOINT_DEFINE
#include "sample_component_provider.h" 

int main(int argc, char **argv)
{
    int i = 0;

    for (i = 0; i < 2000; i++) {
        tracepoint(sample_component, message, "Hello World", 1.E+2f, 1.E+3, 1.E+4L);
        usleep(10);
    }
    return 0;
}

sample_component_provider.h

[...]
TRACEPOINT_EVENT(
    sample_component,
    message,
    TP_ARGS(char *, text, float, floatvalue, double, doublevalue, long double, longdoublevalue),
    TP_FIELDS(
        ctf_string(message, text)
        ctf_float(float, floatfield, floatvalue)
        ctf_float(double, doublefield, doublevalue)
        ctf_float(long double, longdoublefield, longdoublevalue)
    )
)
[...]

Now I try to create a trace:

$ lttng create mylocalsession
Session mylocalsession created.
Traces will be written in /home/daniel/lttng-traces/mylocalsession-20130312-121313
$ lttng enable-event -u --all
All UST events are enabled in channel channel0
$ lttng start
Tracing started for session mylocalsession
$ lttng destroy
Session mylocalsession destroyed

Between lttng start and lttng destroy I run ./sample from another console.

I get no error messages whatsovever, but the resulting trace has what seems like a correct metadata file...but an empty channel0_0 file (probably not truly empty, just closed incorrectly).

The same exercise, omitting the long double value, works fine.


Files

metadata (8 KB) metadata metadata of (failed) trace of float/double/longdouble UST event Daniel U. Thibault, 03/12/2013 12:39 PM
channel0_0 (88 KB) channel0_0 channel0_0 for the double _Complex failed trace Daniel U. Thibault, 03/12/2013 01:55 PM
metadata (8 KB) metadata metadata for the double _Complex failed trace Daniel U. Thibault, 03/12/2013 01:55 PM
Actions

Also available in: Atom PDF