instruments stall

  • So I was trying to run a command-line tool with the leaks tool, and after just a few seconds of operation it stalled. I actually thought Instruments was somehow configured to only record/run for a short length of time, and spent a while trying to find that non-existant pref ;-)

    Long story made short, I eventually thought to sample my process while it was stalled under Instruments, and that showed the problem:

                      2660 std::ostream& std::ostream::_M_insert<long>(long)
                        2660 std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::do_put(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long) const
                          2660 std::ostreambuf_iterator<char, std::char_traits<char> > std::num_put<char, std::ostreambuf_iterator<char, std::char_traits<char> > >::_M_insert_int<long>(std::ostreambuf_iterator<char, std::char_traits<char> >, std::ios_base&, char, long) const
                            2660 std::ostreambuf_iterator<char, std::char_traits<char> > std::__write<char>(std::ostreambuf_iterator<char, std::char_traits<char> >, char const*, int)
                              2660 fwrite
                                2660 __sfvwrite
                                  2660 _swrite
                                    2660 __swrite
                                      2660 write$NOCANCEL

    Yep, lots of debug info onto std::clog, apparently nothing reading that pipe, so as soon as the buffer is full, the process is blocked. I removed my verbose switch, and the test ran to completion just fine. (And no leaks!)

    Thing is, this is Xcode 3.2.6--still stuck in the past thanks to support of old systems--my questions:

    - Is there any way to view the output while running my process under Instruments? I wanted to do that anyway, regardless of this issue.

    - Is this worth a Radar? Anybody know if this is still the case in later versions of Xcode?

    --
    Scott Ribe
    <scott_ribe...>
    http://www.elevated-dev.com/
    (303) 722-0567 voice
  • On May 12, 2013, at 9:10 AM, Scott Ribe wrote:

    > So I was trying to run a command-line tool with the leaks tool, and after just a few seconds of operation it stalled. I actually thought Instruments was somehow configured to only record/run for a short length of time, and spent a while trying to find that non-existant pref ;-)
    >
    > Long story made short, I eventually thought to sample my process while it was stalled under Instruments, and that showed the problem: …

    > Yep, lots of debug info onto std::clog, apparently nothing reading that pipe, so as soon as the buffer is full, the process is blocked. I removed my verbose switch, and the test ran to completion just fine. (And no leaks!)
    >
    > Thing is, this is Xcode 3.2.6--still stuck in the past thanks to support of old systems--my questions:
    >
    > - Is there any way to view the output while running my process under Instruments? I wanted to do that anyway, regardless of this issue.

    There's a console view in the detail view.  It's one of the choices in the pop-up in the "breadcrumb" path control (other choices are Statistics, Sample List, Call Trees, etc.).

    Also, you can run the "instruments" command-line tool rather than the GUI app.

    Regards,
    Ken
previous month may 2013 next month
MTWTFSS
    1 2 3 4 5
6 7 8 9 10 11 12
13 14 15 16 17 18 19
20 21 22 23 24 25 26
27 28 29 30 31    
Go to today