Re: [go-nuts] How to obtain complete call chain of runtime functions in pprof, like 'mcall'

2020-03-10 Thread Robert Engels
I think they are relevant. It is because the profiler only records a record 
when there is a state transition, which is fine, but then the record needs to 
reflect it, and probably should at least point to the previous record - that is 
- use the same stack trace, so the accounting is correct. 

Seems like a bug to me but it doesn’t appear the Go team either felt the same, 
or had any desire to fix it. 

> On Mar 8, 2020, at 12:37 PM, Xiangdong JI  wrote:
> 
> 
> Thanks Robert, I'm trying to utilize the tool now, the new output rendered by 
> goanalyzer contains a page for PC:0 goroutines, which were discussed in 
> #29103, but seems no further details are available, are they considered 
> irrelevant to perf. analysis? 
> 
>> On Thursday, March 5, 2020 at 8:09:18 PM UTC+8, Robert Engels wrote:
>> You might be interested in github.com/robaho/go-analyzer which I believe 
>> significantly improves the profiling information when dealing with highly 
>> concurrent Go programs. 
>> 
 On Mar 5, 2020, at 12:13 AM, Xiangdong JI  wrote:
 
>>> 
>>> Thanks Ian.
>>> 
>>> I'm using schedtrace and scheddetail to help understand the scheduling 
>>> flow, the minimum monitoring window seems to be 1ms only, possible to get 
>>> more detailed info?
>>> Furthermore, sched* outputs extensive logs but what I expect, at present, 
>>> might be something like when a goroutine is parked due to what reason, 
>>> etc., can I get it with the existing diagnostics?  
>>>  
>>> 
 On Thursday, March 5, 2020 at 11:24:23 AM UTC+8, Ian Lance Taylor wrote:
 On Wed, Mar 4, 2020 at 6:44 PM Xiangdong JI  wrote: 
 > 
 > Given the attached screenshot of pprof output, I wonder how to figure 
 > out the callers of 'runtime.mcall' and their cost? Thanks. 
 
 You can't, but it doesn't matter.  The mcall function is used when a 
 thread changes from executing one goroutine to a different goroutine. 
 Knowing the code that triggers the call into mcall won't tell you 
 anything.  It's just where that goroutine happened to be preempted. 
 
 Ian 
>>> 
>>> -- 
>>> You received this message because you are subscribed to the Google Groups 
>>> "golang-nuts" group.
>>> To unsubscribe from this group and stop receiving emails from it, send an 
>>> email to golan...@googlegroups.com.
>>> To view this discussion on the web visit 
>>> https://groups.google.com/d/msgid/golang-nuts/71ecd07a-0b42-4eba-9b22-5c7cc9821243%40googlegroups.com.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/5b1f728e-68c5-407e-98c6-5e366fc28e53%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/C0D87425-7EF4-48C8-8FD4-A8BE61F8A7FD%40ix.netcom.com.


Re: [go-nuts] How to obtain complete call chain of runtime functions in pprof, like 'mcall'

2020-03-08 Thread Xiangdong JI
Thanks Robert, I'm trying to utilize the tool now, the new output rendered 
by goanalyzer contains a page for PC:0 goroutines, which were discussed in 
#29103 , but seems no further 
details are available, are they considered irrelevant to perf. analysis? 

On Thursday, March 5, 2020 at 8:09:18 PM UTC+8, Robert Engels wrote:
>
> You might be interested in github.com/robaho/go-analyzer which I believe 
> significantly improves the profiling information when dealing with highly 
> concurrent Go programs. 
>
> On Mar 5, 2020, at 12:13 AM, Xiangdong JI > 
> wrote:
>
> 
> Thanks Ian.
>
> I'm using schedtrace and scheddetail to help understand the scheduling 
> flow, the minimum monitoring window seems to be 1ms only, possible to get 
> more detailed info?
> Furthermore, sched* outputs extensive logs but what I expect, at present, 
> might be something like when a goroutine is parked due to what reason, 
> etc., can I get it with the existing diagnostics?  
>  
>
> On Thursday, March 5, 2020 at 11:24:23 AM UTC+8, Ian Lance Taylor wrote:
>>
>> On Wed, Mar 4, 2020 at 6:44 PM Xiangdong JI  wrote: 
>> > 
>> > Given the attached screenshot of pprof output, I wonder how to figure 
>> out the callers of 'runtime.mcall' and their cost? Thanks. 
>>
>> You can't, but it doesn't matter.  The mcall function is used when a 
>> thread changes from executing one goroutine to a different goroutine. 
>> Knowing the code that triggers the call into mcall won't tell you 
>> anything.  It's just where that goroutine happened to be preempted. 
>>
>> Ian 
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golan...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/71ecd07a-0b42-4eba-9b22-5c7cc9821243%40googlegroups.com
>  
> 
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/5b1f728e-68c5-407e-98c6-5e366fc28e53%40googlegroups.com.


Re: [go-nuts] How to obtain complete call chain of runtime functions in pprof, like 'mcall'

2020-03-05 Thread Ian Lance Taylor
On Wed, Mar 4, 2020 at 10:12 PM Xiangdong JI  wrote:
>
> I'm using schedtrace and scheddetail to help understand the scheduling flow, 
> the minimum monitoring window seems to be 1ms only, possible to get more 
> detailed info?
> Furthermore, sched* outputs extensive logs but what I expect, at present, 
> might be something like when a goroutine is parked due to what reason, etc., 
> can I get it with the existing diagnostics?

Calling runtime.Stack(buf, true) should tell you for each parked
goroutine why it is parked.  Of course it will also give you a lot
more that you don't care about, like the stack backtraces.

Ian


>
> On Thursday, March 5, 2020 at 11:24:23 AM UTC+8, Ian Lance Taylor wrote:
>>
>> On Wed, Mar 4, 2020 at 6:44 PM Xiangdong JI  wrote:
>> >
>> > Given the attached screenshot of pprof output, I wonder how to figure out 
>> > the callers of 'runtime.mcall' and their cost? Thanks.
>>
>> You can't, but it doesn't matter.  The mcall function is used when a
>> thread changes from executing one goroutine to a different goroutine.
>> Knowing the code that triggers the call into mcall won't tell you
>> anything.  It's just where that goroutine happened to be preempted.
>>
>> Ian
>
> --
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/71ecd07a-0b42-4eba-9b22-5c7cc9821243%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcXbSL2GuCrwmJe43SDOL65RWZLYwqrkb_4Cpj8C-t9vUQ%40mail.gmail.com.


Re: [go-nuts] How to obtain complete call chain of runtime functions in pprof, like 'mcall'

2020-03-05 Thread Jake Montgomery
I think you meant https://github.com/robaho/goanalyzer

On Thursday, March 5, 2020 at 7:09:18 AM UTC-5, Robert Engels wrote:
>
> You might be interested in github.com/robaho/go-analyzer which I believe 
> significantly improves the profiling information when dealing with highly 
> concurrent Go programs. 
>
> On Mar 5, 2020, at 12:13 AM, Xiangdong JI > 
> wrote:
>
> 
> Thanks Ian.
>
> I'm using schedtrace and scheddetail to help understand the scheduling 
> flow, the minimum monitoring window seems to be 1ms only, possible to get 
> more detailed info?
> Furthermore, sched* outputs extensive logs but what I expect, at present, 
> might be something like when a goroutine is parked due to what reason, 
> etc., can I get it with the existing diagnostics?  
>  
>
> On Thursday, March 5, 2020 at 11:24:23 AM UTC+8, Ian Lance Taylor wrote:
>>
>> On Wed, Mar 4, 2020 at 6:44 PM Xiangdong JI  wrote: 
>> > 
>> > Given the attached screenshot of pprof output, I wonder how to figure 
>> out the callers of 'runtime.mcall' and their cost? Thanks. 
>>
>> You can't, but it doesn't matter.  The mcall function is used when a 
>> thread changes from executing one goroutine to a different goroutine. 
>> Knowing the code that triggers the call into mcall won't tell you 
>> anything.  It's just where that goroutine happened to be preempted. 
>>
>> Ian 
>>
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golan...@googlegroups.com .
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/71ecd07a-0b42-4eba-9b22-5c7cc9821243%40googlegroups.com
>  
> 
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/f0cbda50-8b8e-4dbd-a770-9e87ecb95328%40googlegroups.com.


Re: [go-nuts] How to obtain complete call chain of runtime functions in pprof, like 'mcall'

2020-03-05 Thread Robert Engels
You might be interested in github.com/robaho/go-analyzer which I believe 
significantly improves the profiling information when dealing with highly 
concurrent Go programs. 

> On Mar 5, 2020, at 12:13 AM, Xiangdong JI  wrote:
> 
> 
> Thanks Ian.
> 
> I'm using schedtrace and scheddetail to help understand the scheduling flow, 
> the minimum monitoring window seems to be 1ms only, possible to get more 
> detailed info?
> Furthermore, sched* outputs extensive logs but what I expect, at present, 
> might be something like when a goroutine is parked due to what reason, etc., 
> can I get it with the existing diagnostics?  
>  
> 
>> On Thursday, March 5, 2020 at 11:24:23 AM UTC+8, Ian Lance Taylor wrote:
>> On Wed, Mar 4, 2020 at 6:44 PM Xiangdong JI  wrote: 
>> > 
>> > Given the attached screenshot of pprof output, I wonder how to figure out 
>> > the callers of 'runtime.mcall' and their cost? Thanks. 
>> 
>> You can't, but it doesn't matter.  The mcall function is used when a 
>> thread changes from executing one goroutine to a different goroutine. 
>> Knowing the code that triggers the call into mcall won't tell you 
>> anything.  It's just where that goroutine happened to be preempted. 
>> 
>> Ian 
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "golang-nuts" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to golang-nuts+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/golang-nuts/71ecd07a-0b42-4eba-9b22-5c7cc9821243%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/1DCC2E56-55B8-4283-ABDE-28AA6271F7E1%40ix.netcom.com.


Re: [go-nuts] How to obtain complete call chain of runtime functions in pprof, like 'mcall'

2020-03-04 Thread Xiangdong JI
Thanks Ian.

I'm using schedtrace and scheddetail to help understand the scheduling 
flow, the minimum monitoring window seems to be 1ms only, possible to get 
more detailed info?
Furthermore, sched* outputs extensive logs but what I expect, at present, 
might be something like when a goroutine is parked due to what reason, 
etc., can I get it with the existing diagnostics?  
 

On Thursday, March 5, 2020 at 11:24:23 AM UTC+8, Ian Lance Taylor wrote:
>
> On Wed, Mar 4, 2020 at 6:44 PM Xiangdong JI  > wrote: 
> > 
> > Given the attached screenshot of pprof output, I wonder how to figure 
> out the callers of 'runtime.mcall' and their cost? Thanks. 
>
> You can't, but it doesn't matter.  The mcall function is used when a 
> thread changes from executing one goroutine to a different goroutine. 
> Knowing the code that triggers the call into mcall won't tell you 
> anything.  It's just where that goroutine happened to be preempted. 
>
> Ian 
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/71ecd07a-0b42-4eba-9b22-5c7cc9821243%40googlegroups.com.


Re: [go-nuts] How to obtain complete call chain of runtime functions in pprof, like 'mcall'

2020-03-04 Thread Ian Lance Taylor
On Wed, Mar 4, 2020 at 6:44 PM Xiangdong JI  wrote:
>
> Given the attached screenshot of pprof output, I wonder how to figure out the 
> callers of 'runtime.mcall' and their cost? Thanks.

You can't, but it doesn't matter.  The mcall function is used when a
thread changes from executing one goroutine to a different goroutine.
Knowing the code that triggers the call into mcall won't tell you
anything.  It's just where that goroutine happened to be preempted.

Ian

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/CAOyqgcU8dz-VpQP7y4r%3D1sho_bLuLdMtfZbckyx7uFyEueDZ_g%40mail.gmail.com.


[go-nuts] How to obtain complete call chain of runtime functions in pprof, like 'mcall'

2020-03-04 Thread Xiangdong JI
Hi,

Given the attached screenshot of pprof output, I wonder how to figure out 
the callers of 'runtime.mcall' and their cost? Thanks.

(The image is generated by profiling BenchmarkGoroutineBlocking).

[image: Capture.JPG]


-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/golang-nuts/b0ac497f-ae50-4033-b970-d35c02350df3%40googlegroups.com.