The XML output from valgrind tools should be written to a stdio FILE that has setlinebuf() so that the output for each error appears immediately, yet with reasonable buffering efficiency. Currently the output is buffered to the default block size (4KB or 8KB), so recent errors often are delayed as viewed by another process which is watching the XML output. This inhibits "online" use, which can be handy for debugging. (Motivated by a recent request in [valgrind-developers] mailing list.)
Well I doubt it goes through stdio, as valgrind isn't linked against the C library so it has to do everything directly. Looking at it as far as I can see each call to VG_(printf_xml) winds up sending the bytes to the logging sink when it is done (or before if the buffer fills) and send_bytes_to_logging_sink just does a write to the file descriptor using the write system call. So I'm at a bit of a loss to understand where any buffering is happening...