From: compudj@krystal.dyndns.org (Mathieu Desnoyers)
Subject: [ltt-dev] net extended trace openin error with LTTV (without attachment)
Date: Wed, 10 Feb 2010 16:25:01 -0500 [thread overview]
Message-ID: <20100210212501.GA3662@Krystal> (raw)
In-Reply-To: <4B71A676.3020101@polymtl.ca>
* Benjamin Poirier (benjamin.poirier at polymtl.ca) wrote:
>
> Mathieu Desnoyers wrote:
> > * Mathieu Desnoyers (compudj at krystal.dyndns.org) wrote:
> >
[..]
> >> I found the culprit:
> >>
> >> include/linux/ltt-type-serializer.h:
> >>
> >> /*
> >> * Statically check that 0 < largest_align < sizeof(void *) to make sure it is
> >> * dumb-proof. It will make sure 0 is changed into 1 and unsigned long long is
> >> * changed into sizeof(void *) on 32-bit architectures.
> >> */
> >> static inline void ltt_specialized_trace(const struct marker *mdata,
> >> void *probe_data,
> >> void *serialize_private, unsigned int data_size,
> >> unsigned int largest_align)
> >> {
> >> largest_align = min_t(unsigned int, largest_align, sizeof(void *));
> >> largest_align = max_t(unsigned int, largest_align, 1);
> >> _ltt_specialized_trace(mdata, probe_data, serialize_private, data_size,
> >> largest_align);
> >> }
> >>
> >> It caps the alignment to the architecture size. I'll remove the min_t()
> >> line and it should be allright for the next release. Can you test it
> >> meanwhile ?
> >>
> >
> > LTTng 0.190 should fix this alignment problem. Feedback would be welcome.
> >
> > Thanks,
> >
> Nope, same problem I believe:
I just spent the afternoon looking at this problem, and noticed that the
alignment change introduced by trace format 2.4 does not follow the gcc
alignment. So I'll revert to the previous behavior and bump the trace
format version to 2.6.
Basically, alignment of uint64_t and unsigned long long will be on
32 bits (and not 64) on 32-bit architectures.
This will be fixed in the upcoming lttng and lttv versions.
Thanks,
Mathieu
>
> metadata.core_marker_id: 40.870000627 (/tmp/trace3/metadata_0), 0, 0, ,
> , 0, 0x0, MODE_UNKNOWN { channel = "net", name = "udpv4_rcv_extended",
> event_id = 2, int = 4, long = 4, pointer = 4, size_t = 4, alignment = 4 }
> metadata.core_marker_format: 40.870002196 (/tmp/trace3/metadata_0), 0,
> 0, , , 0, 0x0, MODE_UNKNOWN { channel = "net", name =
> "udpv4_rcv_extended", format = "skb 0x%lX saddr #n4u%lu daddr #n4u%lu
> unicast #1u%u ulen #n2u%hu source #n2u%hu dest #n2u%hu data_start #8u%lx" }
> [...]
> net.udpv4_rcv_extended: 44.175529809 (/tmp/trace3/net_0), 0, 0, swapper,
> , 0, 0x0, SOFTIRQ { skb = 0xDA225A80, saddr = 2228195330, daddr =
> 2228200116, unicast = 1, ulen = 188, source = 53, dest = 45569,
> data_start = a2068db001000100 }
> **
> ERROR:tracefile.c:1582:ltt_update_event_size: assertion failed: (info !=
> NULL)
> > Mathieu
> >
> >
> >> Thanks,
> >>
> >> Mathieu
> >>
> >>
> >>
> >>> -Ben
> >>>
> >>>> Thanks,
> >>>>
> >>>> Mathieu
> >>>>
> >>>>
> >>>>
> >>>>
> >>>>> diff --git a/ltt/probes/net-extended-trace.c b/ltt/probes/net-extended-trace.c
> >>>>> index 074bfec..88410f8 100644
> >>>>> --- a/ltt/probes/net-extended-trace.c
> >>>>> +++ b/ltt/probes/net-extended-trace.c
> >>>>> @@ -130,14 +130,14 @@ notrace void probe_udpv4_rcv_extended(struct sk_buff *skb)
> >>>>> * bytes of UDP data if they are not in a fragment*/
> >>>>> data.f8 = 0;
> >>>>> if (skb_headlen(skb) >= sizeof(struct udphdr) + 8)
> >>>>> - data.f8 = *(unsigned long long *)(skb->data + sizeof(*uh));
> >>>>> + data.f8 = *(uint64_t *)(skb->data + sizeof(*uh));
> >>>>> else if (skb_headlen(skb) >= sizeof(struct udphdr))
> >>>>> memcpy(&data.f8, skb->data + sizeof(struct udphdr),
> >>>>> skb_headlen(skb) - sizeof(struct udphdr));
> >>>>>
> >>>>> marker = &GET_MARKER(net, udpv4_rcv_extended);
> >>>>> ltt_specialized_trace(marker, marker->single.probe_private,
> >>>>> - &data, serialize_sizeof(data), sizeof(unsigned long long));
> >>>>> + &data, serialize_sizeof(data), sizeof(uint64_t));
> >>>>> }
> >>>>>
> >>>>> MODULE_LICENSE("GPL and additional rights");
> >>>>>
> >>>>>
> >>>>>
> >>>>>> Thanks,
> >>>>>> Gergely
> >>>>>>
> >>>>>>
> >>>>>> ------------------------------------------------------------------------
> >>>>>>
> >>>>>> _______________________________________________
> >>>>>> ltt-dev mailing list
> >>>>>> ltt-dev at lists.casi.polymtl.ca
> >>>>>> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> >>>>>>
> >>>>>>
> >>>>> _______________________________________________
> >>>>> ltt-dev mailing list
> >>>>> ltt-dev at lists.casi.polymtl.ca
> >>>>> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> >>>>>
> >>>>>
> >>>>>
> >>>>
> >>>>
> >> --
> >> Mathieu Desnoyers
> >> OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
> >>
> >> _______________________________________________
> >> ltt-dev mailing list
> >> ltt-dev at lists.casi.polymtl.ca
> >> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> >>
> >>
> >
> >
>
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
>
--
Mathieu Desnoyers
OpenPGP key fingerprint: 8CD5 52C3 8E3C 4140 715F BA06 3F25 A8FE 3BAE 9A68
next prev parent reply other threads:[~2010-02-10 21:25 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-02-08 15:24 paljak
2010-02-08 15:24 ` paljak
2010-02-08 15:36 ` Mathieu Desnoyers
2010-02-08 19:45 ` paljak
2010-02-08 19:45 ` paljak
2010-02-08 20:07 ` Benjamin Poirier
2010-02-08 20:32 ` Mathieu Desnoyers
2010-02-08 21:30 ` Benjamin Poirier
2010-02-09 17:03 ` Mathieu Desnoyers
2010-02-09 17:59 ` Mathieu Desnoyers
2010-02-09 18:16 ` Benjamin Poirier
2010-02-10 21:25 ` Mathieu Desnoyers [this message]
2010-02-09 21:45 ` paljak
2010-02-09 21:45 ` paljak
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100210212501.GA3662@Krystal \
--to=compudj@krystal.dyndns.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox