public inbox for systemtap@sourceware.org
 help / color / mirror / Atom feed
* atomicity of formatted output?
@ 2012-08-01  5:10 halcyonic
  2012-08-05 20:33 ` Josh Stone
  0 siblings, 1 reply; 3+ messages in thread
From: halcyonic @ 2012-08-01  5:10 UTC (permalink / raw)
  To: systemtap

Sorry, couldn't find this anywhere obvious in the documentation: are there any atomicity guarantees (even "best effort" ones) regarding formatted output from inside probes?  It looks to me like output from different probes is being intermingled occasionally, even if every probe only uses a single printf()...would it help to remove newlines in the printf()?

Thanks,
Nick

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

* Re: atomicity of formatted output?
  2012-08-01  5:10 atomicity of formatted output? halcyonic
@ 2012-08-05 20:33 ` Josh Stone
  2012-08-09  2:20   ` halcyonic
  0 siblings, 1 reply; 3+ messages in thread
From: Josh Stone @ 2012-08-05 20:33 UTC (permalink / raw)
  To: halcyonic; +Cc: systemtap

On 07/31/2012 10:10 PM, halcyonic@gmail.com wrote:
> Sorry, couldn't find this anywhere obvious in the documentation: are
> there any atomicity guarantees (even "best effort" ones) regarding
> formatted output from inside probes?  It looks to me like output from
> different probes is being intermingled occasionally, even if every
> probe only uses a single printf()...would it help to remove newlines
> in the printf()?

IIRC, we do try to keep things line-buffered, at least if you are
outputting to a TTY.  Can you provide an example script & workload where
you see this intermingling?

Josh

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

* Re: atomicity of formatted output?
  2012-08-05 20:33 ` Josh Stone
@ 2012-08-09  2:20   ` halcyonic
  0 siblings, 0 replies; 3+ messages in thread
From: halcyonic @ 2012-08-09  2:20 UTC (permalink / raw)
  To: Josh Stone; +Cc: systemtap

Actually, upon reflection, what I actually think was happening was I was silently hitting the maximum string length, and my strings were getting truncated, which made the output look like it was interleaved.

Nick

On Aug 5, 2012, at 4:33 PM, Josh Stone <jistone@redhat.com> wrote:

> On 07/31/2012 10:10 PM, halcyonic@gmail.com wrote:
>> Sorry, couldn't find this anywhere obvious in the documentation: are
>> there any atomicity guarantees (even "best effort" ones) regarding
>> formatted output from inside probes?  It looks to me like output from
>> different probes is being intermingled occasionally, even if every
>> probe only uses a single printf()...would it help to remove newlines
>> in the printf()?
> 
> IIRC, we do try to keep things line-buffered, at least if you are
> outputting to a TTY.  Can you provide an example script & workload where
> you see this intermingling?
> 
> Josh

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

end of thread, other threads:[~2012-08-09  2:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-08-01  5:10 atomicity of formatted output? halcyonic
2012-08-05 20:33 ` Josh Stone
2012-08-09  2:20   ` halcyonic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).