Feature Requests: Browse | Submit New | Admin

[#9356] Need ALL thread summary

Date:
2007-03-18 16:08
Priority:
3
Submitted By:
Kurt Stephens (kstephens)
Assigned To:
Nobody (None)
Category:
None
State:
Open
Summary:
Need ALL thread summary

Detailed description
Need a summary for ALL threads.  Maybe an option --all-threads that also tallies all calls in all threads in a thread
bucket named "thread 0".  This is important for profiling programs that spawn many threads.

Might also be useful to have a --single-thread option that does not tally for individual threads; all stats would be
in "thread 0".

I could implement this one if someone could point out the best plan for attack.

Might make sense to tally the results of all thread at the end of process to avoid thread contention on a global profile
bucket lock.

Thanks,
Kurt Stephens

Add A Comment: Notepad

Please login


Followup

Message
Date: 2009-12-31 18:57
Sender: Roger Pack

looks like my plan for it is to combine threads [in ruby], after
the fact.  That should hopefully be straight forward and unpainful
:)
-r
Date: 2007-10-17 18:27
Sender: Roger Pack

I also wish for this.
Date: 2007-07-01 00:47
Sender: Charlie Savage

Hi Kurt,

I was just looking at better thread support and the problem is
that the timings double count times spent in background threads.
For example:

  def test_thread_timings
    RubyProf.start
    
    sleep(2)    

    thread = Thread.new do
      sleep(2)
    end
    
    thread.join
    
    result = RubyProf.stop
  end


The main thread will look like it has run for 4 seconds.  I'm
having a hard time seeing how to prevent this though.

If it did work, then could you create what you need by looping
over each thread and method, and adding up the times?

Thanks,

Charlie

Attached Files:

Name Description Download
No Files Currently Attached

Changes:

No Changes Have Been Made to This Item