Re: [go-nuts] cpu profiling in CGO

2017-01-15 Thread Ian Lance Taylor
On Sun, Jan 15, 2017 at 6:44 PM, Yucong Sun wrote: > Thanks! Indeed, my program spends majority of time in C code. So for 1.8, > would the profiling actually include C/C++ funciton informations? It should, yes. Ian -- You received this message because you are subscribed to the Google Groups "

Re: [go-nuts] cpu profiling in CGO

2017-01-15 Thread Yucong Sun
Thanks! Indeed, my program spends majority of time in C code. So for 1.8, would the profiling actually include C/C++ funciton informations? That's actually a major incentive for me to use Go, because it saves so much time reinventing the wheel on tasks like this On Sun, Jan 15, 2017 at 5:47 PM Ia

Re: [go-nuts] cpu profiling in CGO

2017-01-15 Thread Ian Lance Taylor
On Sun, Jan 15, 2017 at 1:04 AM, Yucong Sun wrote: > > Sorry for replying late. > > 1: operating system is linux > 2. golang 1.7 > 3. I'm statically linking Go with C++ code, so I guess that is > -buildmode=c-archive. With 1.7, if your program spends most of its time in C code that runs in threa

Re: [go-nuts] cpu profiling in CGO

2017-01-15 Thread Yucong Sun
Hi Ian, Sorry for replying late. 1: operating system is linux 2. golang 1.7 3. I'm statically linking Go with C++ code, so I guess that is -buildmode=c-archive. Thanks On Tue, Jan 10, 2017 at 1:21 PM Ian Lance Taylor wrote: > On Tue, Jan 10, 2017 at 12:52 PM, Yucong Sun wrote: > > > > I've

Re: [go-nuts] cpu profiling in CGO

2017-01-10 Thread Ian Lance Taylor
On Tue, Jan 10, 2017 at 12:52 PM, Yucong Sun wrote: > > I've successfully compile and staticlly linked my C++ project and CGO , I > was trying to get on demand CPU profling to work, but it keeps generating > empty outputs. > > The CPU profiling page mentioned that if code built in C mode, i need t

[go-nuts] cpu profiling in CGO

2017-01-10 Thread Yucong Sun
Hi, I've successfully compile and staticlly linked my C++ project and CGO , I was trying to get on demand CPU profling to work, but it keeps generating empty outputs. The CPU profiling page mentioned that if code built in C mode, i need to do something with SIGPROF , but no examples were given