From mboxrd@z Thu Jan 1 00:00:00 1970 From: mathieu.desnoyers@efficios.com (Mathieu Desnoyers) Date: Thu, 26 Apr 2012 17:16:27 -0400 Subject: [lttng-dev] lttng enable-channel option for blocking In-Reply-To: <4F992213.2090103@mentor.com> References: <4F992213.2090103@mentor.com> Message-ID: <20120426211627.GB1646@Krystal> * Woegerer, Paul (Paul_Woegerer at mentor.com) wrote: > There are use-cases where loosing an event is not acceptable. > > Is there some way to make a userspace application block if the buffer is > full (instead of discarding the event or overwriting an old event) ? > > I'm thinking about something like: > > lttng enable-channel myblockingchannel --block > > I know I can increase the subbuf-size but sometimes this is not an > option (embedded targets with less RAM). > > A new channel option like --block would be a fine complement for the > already existing options --discard and --overwrite. > > What do you think ? I already thought about permitting this, but we currently don't. The first thing I must say about this is that I prefer to wait a bit before we add this feature, and think about its impact thoroughly, because allowing the tracer to block applications gives a lot of power to the tracer: e.g., if tracing is stopped due to error conditions, or disk full, or network traffic slowdown, how do we handle the fact that this might block progress in all traced applications ? The current modes (discard and overwrite) let the applications continue even if there is too much data being recorded into the trace buffers -- this is a "safe" approach. How would you recommend dealing with the possible pitfalls of blocking traced applications ? We would need a mechanism in place to ensure gathering a trace cannot make applications unresponsive. Thanks, Mathieu > Thanks, > Paul > > -- > Paul Woegerer | SW Development Engineer > Mentor Embedded(tm) | Prinz Eugen Stra?e 72/2/4, Vienna, 1040 Austria > P 43.1.535991320 > Nucleus? | Linux? | Android(tm) | Services | UI | Multi-OS > > Android is a trademark of Google Inc. Use of this trademark is subject to Google Permissions. > Linux is the registered trademark of Linus Torvalds in the U.S. and other countries. > > > _______________________________________________ > lttng-dev mailing list > lttng-dev at lists.lttng.org > http://lists.lttng.org/cgi-bin/mailman/listinfo/lttng-dev -- Mathieu Desnoyers Operating System Efficiency R&D Consultant EfficiOS Inc. http://www.efficios.com