search for: setunbuffered

Displaying 14 results from an estimated 14 matches for "setunbuffered".

2009 Dec 18
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...return; > > > > + if (DeleteStream) > > > > + delete TheStream; > > > > + else if (BufferSize > 0) > > > > + TheStream->SetBufferSize(BufferSize); > > > > + else > > > > + TheStream->SetUnbuffered(); > > > > > > Another issue is that this is transfering the circular stream's > > > buffer to the underlying stream. Would it make more sense and would it > > > be worth it to save the underlying streams buffer size and restore it > > > in releaseS...
2009 Dec 18
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...ream) > > > + return; > > > + if (DeleteStream) > > > + delete TheStream; > > > + else if (BufferSize > 0) > > > + TheStream->SetBufferSize(BufferSize); > > > + else > > > + TheStream->SetUnbuffered(); > > Another issue is that this is transfering the circular stream's > > buffer to the underlying stream. Would it make more sense and would it > > be worth it to save the underlying streams buffer size and restore it in > > releaseStream? > > Oh, I think this c...
2009 Dec 18
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...t; + if (DeleteStream) > > > > > + delete TheStream; > > > > > + else if (BufferSize > 0) > > > > > + TheStream->SetBufferSize(BufferSize); > > > > > + else > > > > > + TheStream->SetUnbuffered(); > > > > > > > > Another issue is that this is transfering the circular stream's > > > > buffer to the underlying stream. Would it make more sense and would > > > > it be worth it to save the underlying streams buffer size and restore > >...
2009 Dec 18
4
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...stream. > > + if (!TheStream) > > + return; > > + if (DeleteStream) > > + delete TheStream; > > + else if (BufferSize > 0) > > + TheStream->SetBufferSize(BufferSize); > > + else > > + TheStream->SetUnbuffered(); > > Again, I don't think an unbuffered circular stream makes a lot of sense > here. See above. :) > Another issue is that this is transfering the circular stream's > buffer to the underlying stream. Would it make more sense and would it be > worth it to save the u...
2009 Dec 17
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...m = Delete; + + if (BufferSize > 0) { + // This circular_raw_ostream will do its own buffering and it + // doesn't need or want TheStream to do another layer of + // buffering underneath. Tell TheStream not to do its own + // buffering. + TheStream->SetUnbuffered(); + } + } + + /// dumpLog - Force output of the buffer along with a small + /// header. + /// + void dumpLog(void); + + private: + void releaseStream() { + // Delete the stream if needed. Otherwise, transfer the buffer + // settings from this raw_ostream back to t...
2009 Dec 16
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Wednesday 16 December 2009 13:19, Chris Lattner wrote: > + int BufferSize; > + std::vector<char> BufferArray; > + bool DelayOutput; > + std::vector<char>::iterator Cur; > > Please doxygenify these. Ok. > Instead of using a std::vector for BufferArray, please just new[] an array > since it is fixed size. Ok. > Why is BufferSize needed with
2009 Dec 18
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...this raw_ostream back to the underlying stream. > + if (!TheStream) > + return; > + if (DeleteStream) > + delete TheStream; > + else if (BufferSize > 0) > + TheStream->SetBufferSize(BufferSize); > + else > + TheStream->SetUnbuffered(); Again, I don't think an unbuffered circular stream makes a lot of sense here. Another issue is that this is transfering the circular stream's buffer to the underlying stream. Would it make more sense and would it be worth it to save the underlying streams buffer size and restore it in...
2009 Dec 21
0
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...tream = Owns; + + if (BufferSize != 0) { + // This circular_raw_ostream will do its own buffering and it + // doesn't need or want TheStream to do another layer of + // buffering underneath. Tell TheStream not to do its own + // buffering. + TheStream->SetUnbuffered(); + } + } + + /// flushBufferWithBanner - Force output of the buffer along with + /// a small header. + /// + void flushBufferWithBanner(void); + + private: + /// releaseStream - Delete the held stream if needed. Otherwise, + /// transfer the buffer settings from this ci...
2009 Dec 16
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Dec 16, 2009, at 8:12 AM, David Greene wrote: >>> >>> What, specifically, do you want reviewed before I start checking in? >>> I'll be happy to prepare a patch that shows just that. >> >> I want a patch that does one thing (e.g. implements dbgs(), > > Ok, let's start with that. Here's the patch to add the circular raw_ostream. This
2009 Dec 19
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
On Friday 18 December 2009 19:47, Chris Lattner wrote: > On Dec 18, 2009, at 3:46 PM, David Greene wrote: > > + /// circular_raw_ostream - A raw_ostream that saves its output in a > > + /// circular buffer. > > A better description would be "which *can* save its data to a circular > buffer, or can pass it through directly to an underlying stream if > specified
2009 Dec 18
2
[LLVMdev] [PATCH] Circular Buffered Debug Stream
...m = Delete; + + if (BufferSize > 0) { + // This circular_raw_ostream will do its own buffering and it + // doesn't need or want TheStream to do another layer of + // buffering underneath. Tell TheStream not to do its own + // buffering. + TheStream->SetUnbuffered(); + } + } + + /// dumpLog - Force output of the buffer along with a small + /// header. + /// + void dumpLog(void); + + private: + void releaseStream() { + // Delete the stream if needed. Otherwise, transfer the buffer + // settings from this raw_ostream back to t...
2018 Jun 14
3
Commit module to Git after each Pass
..., Mar 22, 2018 at 10:38 AM Reid Kleckner via llvm-dev < llvm-dev at lists.llvm.org> wrote: > Obviously, we do not want all stderr output to be buffered. However, I > think it would be great to change Function::print and Module::print to call > raw_ostream::SetBuffered / raw_ostream::SetUnbuffered before and after > printing. I guess if the original stream was buffered we don't want to mark > it unbuffered, so we may need to tweak the raw_ostream interface. Looks > easy, though. > > > On Thu, Mar 22, 2018 at 8:06 AM Fedor Sergeev via llvm-dev < > llvm-dev at lists...
2018 Mar 22
2
Commit module to Git after each Pass
Oh, well... as usually the answer appears to be pretty obvious. 99% of the time is spent inside the plain write. -print-after-all prints into llvm::errs(), which is an *unbuffered* raw_fd_stream. And -git-commit-after-all opens a *buffered* raw_fd_stream. As soon as I hacked -print-after-all to use a buffered stream to stderr performance went up to the normal expected values: ] time bin/opt
2018 Jun 15
2
Commit module to Git after each Pass
...AM Reid Kleckner via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at lists.llvm.org>> wrote: Obviously, we do not want all stderr output to be buffered. However, I think it would be great to change Function::print and Module::print to call raw_ostream::SetBuffered / raw_ostream::SetUnbuffered before and after printing. I guess if the original stream was buffered we don't want to mark it unbuffered, so we may need to tweak the raw_ostream interface. Looks easy, though. On Thu, Mar 22, 2018 at 8:06 AM Fedor Sergeev via llvm-dev <llvm-dev at lists.llvm.org<mailto:llvm-dev at li...