Re: [go-nuts] runtime shutdown internal routines? / locating Go runtime threads

2020-03-05 Thread Ian Lance Taylor
On Thu, Mar 5, 2020 at 8:35 PM Jason E. Aten wrote: > > Is there code internal to the runtime that shuts down all of its threads at > the end of the process, or does it just > rely upon the OS to do the cleanup? It just relies on the OS. > I'm asking for a Windows DLL unload situation, hoping

[go-nuts] Re: runtime shutdown internal routines? / locating Go runtime threads

2020-03-05 Thread brainman
What is your problem? If you fill in this http://golang.org/issue/new Some might help you. Alex -- 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

[go-nuts] runtime shutdown internal routines? / locating Go runtime threads

2020-03-05 Thread Jason E. Aten
Is there code internal to the runtime that shuts down all of its threads at the end of the process, or does it just rely upon the OS to do the cleanup? I'm asking for a Windows DLL unload situation, hoping to be able to unmap the runtimes memory without having it crash the main program on DLL

Re: [go-nuts] Re: Language proposal: labelled "with" statements to help make test code easier to write

2020-03-05 Thread Dan Kortschak
I'm really struggling to understand the benefit that you say you'll get. The linear form that the with: label gives you is really just what we already use with a different accent. The cost of testing or not is not substantially different, but the cost of allowing long linear functions, needing

Re: [go-nuts] Language proposal: labelled "with" statements to help make test code easier to write

2020-03-05 Thread Bakul Shah
On Mar 5, 2020, at 12:05 AM, roger peppe wrote: > > Having said all that, I believe there is a valid point to be made > with regard to testing concurrent Go programs that have long-lived > behaviour over time. It can be hard to test such programs, and I've > not yet seen an approach that doesn't

Re: [go-nuts] Re: Language proposal: labelled "with" statements to help make test code easier to write

2020-03-05 Thread David Riley
On Mar 5, 2020, at 5:17 PM, Warren Stephens wrote: > > So I should invent a fractal programming language -- where every function > must be defined within another function -- have people write tests for that! I think we call that "LISP". - Dave -- You received this message because you are

Re: [go-nuts] Re: Language proposal: labelled "with" statements to help make test code easier to write

2020-03-05 Thread Warren Stephens
Dave, A key amount of testing here and there is a great thing, but I think that folks greatly underestimate the amount of time (per your example) and effort put into increasing test coverage only to have a project shut down! There often is no "long run"! Whereas, what I call "real world"

Re: [go-nuts] Re: Language proposal: labelled "with" statements to help make test code easier to write

2020-03-05 Thread David Riley
On Mar 5, 2020, at 9:26 AM, Warren Stephens wrote: > > And I am saying Functions PLUS Structure. > > > > Functions remain. Visible structure is added. Right, and you can do your testing at the boundaries of those functions, because the structure is nothing but a shell (in most Step Lambda

Re: [go-nuts] Re: escape analysis question

2020-03-05 Thread 'Matthew Dempsky' via golang-nuts
Some of the issues in that doc should be addressed now (e.g., the first two), but the "Assignment to indirect escapes" case still applies. The issue here is we don't do any points-to analysis during escape analysis, so we conservatively assume "*p = x" might assign x to the heap. Ideally, I

Re: [go-nuts] Re: escape analysis question

2020-03-05 Thread Ian Lance Taylor
[ +mdempsky ] On Thu, Mar 5, 2020 at 2:58 AM Ethan Burns wrote: > > Thanks. I'll give that doc a read. Just to make sure, I noticed that the doc > is dated 2015, but the escape analysis implementation seemed to change just > recently from that implemented in esc.go to a new one in escape.go.

Re: [go-nuts] Re: Learning the runtime

2020-03-05 Thread Ian Lance Taylor
On Wed, Mar 4, 2020 at 8:26 PM wrote: > > Turns out, other parts of the runtime have decent docs – mgc.go is very well > commented, for example. I may have started my research in the darkest corners > (itab, ptab, ftab, oh my). Improvements to the comments are always welcome, and the best

Re: [go-nuts] Pass C struct from Go to C method

2020-03-05 Thread Ian Lance Taylor
On Wed, Mar 4, 2020 at 10:06 PM Nitish Saboo wrote: > > Thank you for the response.Got it. > Basically, fmt.Println(InitStruct) is printing the values of fields, cb and > data, for the struct Foo pointed by InitStruct. > fmt.Printf("%p\n", InitStruct) is printing the memory address. > Btw..can

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

Re: [go-nuts] How to find goroutines during debugging - aka goroutine labeling

2020-03-05 Thread Robert Engels
This is what I was referring to by performance. I think it needs to be "always on", and should be included in stack-traces - but we need exceptions first :)-Original Message- From: Jesper Louis Andersen Sent: Mar 4, 2020 7:29 AM To: Florin Pățan Cc: golang-nuts Subject: Re: [go-nuts]

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

Re: [go-nuts] Language proposal: labelled "with" statements to help make test code easier to write

2020-03-05 Thread David Riley
On Mar 2, 2020, at 1:54 PM, Warren Stephens wrote: > > I have never experienced that writing tests at the beginning saves time. I > find it is always faster to not write them in the beginning. Functionality > typically changes 3 or 4 times before it "settles down" enough that writing >

Re: [go-nuts] Re: Language proposal: labelled "with" statements to help make test code easier to write

2020-03-05 Thread Warren Stephens
And I am saying Functions PLUS Structure. Functions remain. Visible structure is added. Warren -- 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

Re: [go-nuts] Re: Language proposal: labelled "with" statements to help make test code easier to write

2020-03-05 Thread Robert Engels
It’s in the name “Step FUNCTION”. They are composable testable units. This is what people are telling you to use. > On Mar 5, 2020, at 7:42 AM, Warren Stephens > wrote: > > All, > > If the code here is not making sense then take a look AWS Step Functions. > > AWS Step Functions homepage >

[go-nuts] Re: Language proposal: labelled "with" statements to help make test code easier to write

2020-03-05 Thread Warren Stephens
All, If the code here is not making sense then take a look AWS Step Functions. AWS Step Functions homepage And imagine something that is compiled, rather than the web service that AWS offers. AWS Step Functions can be

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

[go-nuts] Changing source code in order code to be supported from older Golang versions e.g. Go 1.10

2020-03-05 Thread Dimitrios Trechas
Dear colleagues, There are even now cases that a Windows XP is needed. The latest Golang compiler that could target XP was 1.10. Is there anyone who had to write a source converter that could convert recent Golang code to backwards compatible code (in case there is no version clash/hell of

Re: [go-nuts] Re: escape analysis question

2020-03-05 Thread Ethan Burns
Thanks. I'll give that doc a read. Just to make sure, I noticed that the doc is dated 2015, but the escape analysis implementation seemed to change just recently from that implemented in esc.go to a new one in escape.go. Dose the doc still apply to the new implementation? On Thu, Mar 5, 2020 at

[go-nuts] Re: escape analysis question

2020-03-05 Thread tokers
This is a known deficiency of Go's escape analysis, which is recorded in this doc: https://docs.google.com/document/d/1CxgUBPlx9iJzkz9JWkb6tIpTe5q32QDmz8l0BouG0Cw/view# On Thursday, March 5, 2020 at 5:58:37 AM UTC+8, burns...@gmail.com wrote: > > Hi All, > > I am trying to debug why a byte

Re: [go-nuts] Re: Language proposal: labelled "with" statements to help make test code easier to write

2020-03-05 Thread roger peppe
On Wed, 4 Mar 2020 at 23:32, Warren Stephens wrote: > Folks, > > First off thanks for the feedback! -- positive and negative. > > Second, hopefully people can trust that I fully understand the standard > approach to code refactoring and writing tests. I have done a bunch of it, > and am sure