Mirror of the lttng-dev mailing list
 help / color / mirror / Atom feed
* [ltt-dev] UST double-buffering won't always trigger consumer daemon
       [not found] ` <20111031222642.GA32286@Krystal>
@ 2011-11-01 17:18   ` Mathieu Desnoyers
  2011-11-02  8:19     ` Anders Carlsson
  0 siblings, 1 reply; 4+ messages in thread
From: Mathieu Desnoyers @ 2011-11-01 17:18 UTC (permalink / raw)


* Mathieu Desnoyers (compudj at krystal.dyndns.org) wrote:
> * Anders Carlsson (capricornalpha2 at gmail.com) wrote:
> > Hello!
> > 
> > I working on a UST port, but I cannot _reliably_ get trace data trough to
> > the consumer daemon. To me it seems the traced application fails to trigger
> > the consumer daemon when a sub-buffer boundary is crossed.
> 
> Can you specify which UST version you are working on ?
> 
> This looks like one of the few design issues that I fixed in the generic
> ring buffer that I introduce in userspace in UST 2.0.

For everyone's benefit, I received a private reply stating that the
problem was not in UST upstream, but rather in the specific adaptation
Anders is working on.

Thanks,

Mathieu

> 
> Thanks,
> 
> Mathieu
> 
> > 
> > From buffers.h:
> > 
> > static __inline__ void ltt_check_deliver(struct ust_channel *chan,
> >         struct ust_buffer *buf,
> >         long offset, long commit_count, long idx)
> > {
> >     long old_commit_count = commit_count - chan->subbuf_size;
> > 
> >     /* Check if all commits have been done */
> >     if (unlikely((BUFFER_TRUNC(offset, chan)
> >             >> chan->n_subbufs_order)
> >             - (old_commit_count
> >                & chan->commit_count_mask) == 0)) {
> > ...
> > 
> > This condition becomes true only when commit_count equals a multiple of
> > chan->subbuf_size, but when I add a printout of the values it appears that
> > the buffer boundary is often crossed without commit_count ever becoming
> > equal to the subbuffer size. In those cases, the trace ceases to operate.
> > This seems to depend on the various tracepoint data sizes, and the order of
> > commit etc.
> > 
> > I suppose this could be taken care of by aligning the reservations to the
> > subbuffer boundaries. It seems to me there is already code to handle that
> > (in ltt_relay_try_reserve_slow()) Am I correct?
> > 
> > Am I missing something (e.g. alignment differences between ARM and x86)?
> > 
> > Should I look somewhere specific?
> > 
> > Thank you for reading this far. Any help is appreciated.
> > 
> > Kind regards
> > Anders
> 
> > _______________________________________________
> > ltt-dev mailing list
> > ltt-dev at lists.casi.polymtl.ca
> > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 
> 
> -- 
> Mathieu Desnoyers
> Operating System Efficiency R&D Consultant
> EfficiOS Inc.
> http://www.efficios.com
> 
> _______________________________________________
> ltt-dev mailing list
> ltt-dev at lists.casi.polymtl.ca
> http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> 

-- 
Mathieu Desnoyers
Operating System Efficiency R&D Consultant
EfficiOS Inc.
http://www.efficios.com



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ltt-dev] UST double-buffering won't always trigger consumer daemon
  2011-11-01 17:18   ` [ltt-dev] UST double-buffering won't always trigger consumer daemon Mathieu Desnoyers
@ 2011-11-02  8:19     ` Anders Carlsson
  2011-11-02  8:19       ` Anders Carlsson
  2011-11-02  8:19       ` Anders Carlsson
  0 siblings, 2 replies; 4+ messages in thread
From: Anders Carlsson @ 2011-11-02  8:19 UTC (permalink / raw)


Thanks Mathieu,

I had to leave work before being able to post a reply myself.

Best regards
Anders

On Tue, Nov 1, 2011 at 6:18 PM, Mathieu Desnoyers <
compudj at krystal.dyndns.org> wrote:

> * Mathieu Desnoyers (compudj at krystal.dyndns.org) wrote:
> > * Anders Carlsson (capricornalpha2 at gmail.com) wrote:
> > > Hello!
> > >
> > > I working on a UST port, but I cannot _reliably_ get trace data trough
> to
> > > the consumer daemon. To me it seems the traced application fails to
> trigger
> > > the consumer daemon when a sub-buffer boundary is crossed.
> >
> > Can you specify which UST version you are working on ?
> >
> > This looks like one of the few design issues that I fixed in the generic
> > ring buffer that I introduce in userspace in UST 2.0.
>
> For everyone's benefit, I received a private reply stating that the
> problem was not in UST upstream, but rather in the specific adaptation
> Anders is working on.
>
> Thanks,
>
> Mathieu
>
> >
> > Thanks,
> >
> > Mathieu
> >
> > >
> > > From buffers.h:
> > >
> > > static __inline__ void ltt_check_deliver(struct ust_channel *chan,
> > >         struct ust_buffer *buf,
> > >         long offset, long commit_count, long idx)
> > > {
> > >     long old_commit_count = commit_count - chan->subbuf_size;
> > >
> > >     /* Check if all commits have been done */
> > >     if (unlikely((BUFFER_TRUNC(offset, chan)
> > >             >> chan->n_subbufs_order)
> > >             - (old_commit_count
> > >                & chan->commit_count_mask) == 0)) {
> > > ...
> > >
> > > This condition becomes true only when commit_count equals a multiple of
> > > chan->subbuf_size, but when I add a printout of the values it appears
> that
> > > the buffer boundary is often crossed without commit_count ever becoming
> > > equal to the subbuffer size. In those cases, the trace ceases to
> operate.
> > > This seems to depend on the various tracepoint data sizes, and the
> order of
> > > commit etc.
> > >
> > > I suppose this could be taken care of by aligning the reservations to
> the
> > > subbuffer boundaries. It seems to me there is already code to handle
> that
> > > (in ltt_relay_try_reserve_slow()) Am I correct?
> > >
> > > Am I missing something (e.g. alignment differences between ARM and
> x86)?
> > >
> > > Should I look somewhere specific?
> > >
> > > Thank you for reading this far. Any help is appreciated.
> > >
> > > Kind regards
> > > Anders
> >
> > > _______________________________________________
> > > ltt-dev mailing list
> > > ltt-dev at lists.casi.polymtl.ca
> > > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> >
> >
> > --
> > Mathieu Desnoyers
> > Operating System Efficiency R&D Consultant
> > EfficiOS Inc.
> > http://www.efficios.com
> >
> > _______________________________________________
> > ltt-dev mailing list
> > ltt-dev at lists.casi.polymtl.ca
> > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> >
>
> --
> Mathieu Desnoyers
> Operating System Efficiency R&D Consultant
> EfficiOS Inc.
> http://www.efficios.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20111102/2849b03c/attachment-0003.htm>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ltt-dev] UST double-buffering won't always trigger consumer daemon
  2011-11-02  8:19     ` Anders Carlsson
@ 2011-11-02  8:19       ` Anders Carlsson
  2011-11-02  8:19       ` Anders Carlsson
  1 sibling, 0 replies; 4+ messages in thread
From: Anders Carlsson @ 2011-11-02  8:19 UTC (permalink / raw)


Thanks Mathieu,

I had to leave work before being able to post a reply myself.

Best regards
Anders

On Tue, Nov 1, 2011 at 6:18 PM, Mathieu Desnoyers <
compudj at krystal.dyndns.org> wrote:

> * Mathieu Desnoyers (compudj at krystal.dyndns.org) wrote:
> > * Anders Carlsson (capricornalpha2 at gmail.com) wrote:
> > > Hello!
> > >
> > > I working on a UST port, but I cannot _reliably_ get trace data trough
> to
> > > the consumer daemon. To me it seems the traced application fails to
> trigger
> > > the consumer daemon when a sub-buffer boundary is crossed.
> >
> > Can you specify which UST version you are working on ?
> >
> > This looks like one of the few design issues that I fixed in the generic
> > ring buffer that I introduce in userspace in UST 2.0.
>
> For everyone's benefit, I received a private reply stating that the
> problem was not in UST upstream, but rather in the specific adaptation
> Anders is working on.
>
> Thanks,
>
> Mathieu
>
> >
> > Thanks,
> >
> > Mathieu
> >
> > >
> > > From buffers.h:
> > >
> > > static __inline__ void ltt_check_deliver(struct ust_channel *chan,
> > >         struct ust_buffer *buf,
> > >         long offset, long commit_count, long idx)
> > > {
> > >     long old_commit_count = commit_count - chan->subbuf_size;
> > >
> > >     /* Check if all commits have been done */
> > >     if (unlikely((BUFFER_TRUNC(offset, chan)
> > >             >> chan->n_subbufs_order)
> > >             - (old_commit_count
> > >                & chan->commit_count_mask) == 0)) {
> > > ...
> > >
> > > This condition becomes true only when commit_count equals a multiple of
> > > chan->subbuf_size, but when I add a printout of the values it appears
> that
> > > the buffer boundary is often crossed without commit_count ever becoming
> > > equal to the subbuffer size. In those cases, the trace ceases to
> operate.
> > > This seems to depend on the various tracepoint data sizes, and the
> order of
> > > commit etc.
> > >
> > > I suppose this could be taken care of by aligning the reservations to
> the
> > > subbuffer boundaries. It seems to me there is already code to handle
> that
> > > (in ltt_relay_try_reserve_slow()) Am I correct?
> > >
> > > Am I missing something (e.g. alignment differences between ARM and
> x86)?
> > >
> > > Should I look somewhere specific?
> > >
> > > Thank you for reading this far. Any help is appreciated.
> > >
> > > Kind regards
> > > Anders
> >
> > > _______________________________________________
> > > ltt-dev mailing list
> > > ltt-dev at lists.casi.polymtl.ca
> > > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> >
> >
> > --
> > Mathieu Desnoyers
> > Operating System Efficiency R&D Consultant
> > EfficiOS Inc.
> > http://www.efficios.com
> >
> > _______________________________________________
> > ltt-dev mailing list
> > ltt-dev at lists.casi.polymtl.ca
> > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> >
>
> --
> Mathieu Desnoyers
> Operating System Efficiency R&D Consultant
> EfficiOS Inc.
> http://www.efficios.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/ltt-dev/attachments/20111102/2849b03c/attachment-0001.htm>


^ permalink raw reply	[flat|nested] 4+ messages in thread

* [ltt-dev] UST double-buffering won't always trigger consumer daemon
  2011-11-02  8:19     ` Anders Carlsson
  2011-11-02  8:19       ` Anders Carlsson
@ 2011-11-02  8:19       ` Anders Carlsson
  1 sibling, 0 replies; 4+ messages in thread
From: Anders Carlsson @ 2011-11-02  8:19 UTC (permalink / raw)


Thanks Mathieu,

I had to leave work before being able to post a reply myself.

Best regards
Anders

On Tue, Nov 1, 2011 at 6:18 PM, Mathieu Desnoyers <
compudj at krystal.dyndns.org> wrote:

> * Mathieu Desnoyers (compudj at krystal.dyndns.org) wrote:
> > * Anders Carlsson (capricornalpha2 at gmail.com) wrote:
> > > Hello!
> > >
> > > I working on a UST port, but I cannot _reliably_ get trace data trough
> to
> > > the consumer daemon. To me it seems the traced application fails to
> trigger
> > > the consumer daemon when a sub-buffer boundary is crossed.
> >
> > Can you specify which UST version you are working on ?
> >
> > This looks like one of the few design issues that I fixed in the generic
> > ring buffer that I introduce in userspace in UST 2.0.
>
> For everyone's benefit, I received a private reply stating that the
> problem was not in UST upstream, but rather in the specific adaptation
> Anders is working on.
>
> Thanks,
>
> Mathieu
>
> >
> > Thanks,
> >
> > Mathieu
> >
> > >
> > > From buffers.h:
> > >
> > > static __inline__ void ltt_check_deliver(struct ust_channel *chan,
> > >         struct ust_buffer *buf,
> > >         long offset, long commit_count, long idx)
> > > {
> > >     long old_commit_count = commit_count - chan->subbuf_size;
> > >
> > >     /* Check if all commits have been done */
> > >     if (unlikely((BUFFER_TRUNC(offset, chan)
> > >             >> chan->n_subbufs_order)
> > >             - (old_commit_count
> > >                & chan->commit_count_mask) == 0)) {
> > > ...
> > >
> > > This condition becomes true only when commit_count equals a multiple of
> > > chan->subbuf_size, but when I add a printout of the values it appears
> that
> > > the buffer boundary is often crossed without commit_count ever becoming
> > > equal to the subbuffer size. In those cases, the trace ceases to
> operate.
> > > This seems to depend on the various tracepoint data sizes, and the
> order of
> > > commit etc.
> > >
> > > I suppose this could be taken care of by aligning the reservations to
> the
> > > subbuffer boundaries. It seems to me there is already code to handle
> that
> > > (in ltt_relay_try_reserve_slow()) Am I correct?
> > >
> > > Am I missing something (e.g. alignment differences between ARM and
> x86)?
> > >
> > > Should I look somewhere specific?
> > >
> > > Thank you for reading this far. Any help is appreciated.
> > >
> > > Kind regards
> > > Anders
> >
> > > _______________________________________________
> > > ltt-dev mailing list
> > > ltt-dev at lists.casi.polymtl.ca
> > > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> >
> >
> > --
> > Mathieu Desnoyers
> > Operating System Efficiency R&D Consultant
> > EfficiOS Inc.
> > http://www.efficios.com
> >
> > _______________________________________________
> > ltt-dev mailing list
> > ltt-dev at lists.casi.polymtl.ca
> > http://lists.casi.polymtl.ca/cgi-bin/mailman/listinfo/ltt-dev
> >
>
> --
> Mathieu Desnoyers
> Operating System Efficiency R&D Consultant
> EfficiOS Inc.
> http://www.efficios.com
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.casi.polymtl.ca/pipermail/lttng-dev/attachments/20111102/2849b03c/attachment-0002.htm>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-11-02  8:19 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <CAM7ttQhXvoC01+sSYfCO2RkAht82PrAHmdzj9o4pfzS9vdyo9w@mail.gmail.com>
     [not found] ` <20111031222642.GA32286@Krystal>
2011-11-01 17:18   ` [ltt-dev] UST double-buffering won't always trigger consumer daemon Mathieu Desnoyers
2011-11-02  8:19     ` Anders Carlsson
2011-11-02  8:19       ` Anders Carlsson
2011-11-02  8:19       ` Anders Carlsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox