Re: [go-nuts] print* in runtime running into deadlocks

2023-02-26 Thread Xiangdong Ji
ry to allocate -> acquiring 'mheap_.lock' Goroutine-B: hold 'mheap_.lock' -> allocating -> running into activeSweep's diagnostics -> acquiring 'debuglock' On Friday, February 24, 2023 at 7:47:08 AM UTC+8 Ian Lance Taylor wrote: > On Wed, Feb 22, 2023

Re: [go-nuts] print* in runtime running into deadlocks

2023-02-26 Thread Xiangdong Ji
gt; trigger copystack -> try to allocate -> acquiring 'mheap_.lock' Goroutine-B: hold 'mheap_.lock' -> allocating -> running into activeSweep's diagnostics -> acquiring 'debuglock' On Friday, February 24, 2023 at 7:47:08 AM UTC+8 Ian Lance Taylor wrote

[go-nuts] print* in runtime running into deadlocks

2023-02-22 Thread Xiangdong Ji
Hi experts, Looks like the print* helper functions may run into deadlocks if the printer Goroutine is rescheduled to a different M to execute 'printunlock' as the "if mp.printlock==0" checking is likely to fail if M has changed. Wondering is it intentional behavior? As print* are (almostly if n

[go-nuts] expected number of pprof 'total samples'

2021-04-29 Thread Xiangdong Ji
Hi I wonder if the expected number of pprof 'total samples' could be calculated by: duration * sample_rate (100HZ) * CPU usage (by 'top') say if my program's CPU usage reported by 'top' is 200%, and sampling period is 30 seconds, could I expect the total samples of pprof is app

Re: [go-nuts] how to pass analyzer's flag with 'go vet -vettool'

2021-04-13 Thread Xiangdong Ji
wrote: > On Mon Apr 12, 2021 at 10:23 AM -03, Xiangdong Ji wrote: > > Hi, > > > > I'm trying to run "go vet -vettool=$(which fieldalignment) ./..." for a > > large project, and wish to turn its '-fix' option on, wondering how to > > pass > >

[go-nuts] how to pass analyzer's flag with 'go vet -vettool'

2021-04-12 Thread Xiangdong Ji
Hi, I'm trying to run "go vet -vettool=$(which fieldalignment) ./..." for a large project, and wish to turn its '-fix' option on, wondering how to pass that option? Any comment is highly appreciated. -- You received this message because you are subscribed to the Google Groups "golang-nuts" g

[go-nuts] How to clean cache for 'go tool dist test'

2020-03-19 Thread Xiangdong JI
Hi, I'm trying to run 'go tool dist test' after the binary has been built successfully, while always get a cached result, running "go clean -i -r -testcache " and "go clean -cache" in prior doesn't help, can anyone please help here? Thanks. $ go tool dist test -run=go_test:crypto/ # go tool d

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

2020-03-08 Thread Xiangdong JI
f. 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, 20

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

2020-03-04 Thread Xiangdong JI
ne 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 outp

[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 Gr

[go-nuts] Re: How to reduce the fluctuation of micro benchmark results

2020-01-08 Thread Xiangdong JI
Thanks for the replying, tried -benchtime=Nx and the results appeared a little stable now. On Wednesday, January 8, 2020 at 10:19:25 AM UTC+8, Xiangdong JI wrote: > > Hi, > > Significant fluctuation is observed when running micro benchmarks, even > with the same version of go, e.

[go-nuts] Re: How to reduce the fluctuation of micro benchmark results

2020-01-07 Thread Xiangdong JI
BTW. 'drop cache' is made, while setting cpu governor is not supported by the platform. Thanks. On Wednesday, January 8, 2020 at 10:19:25 AM UTC+8, Xiangdong JI wrote: > > Hi, > > Significant fluctuation is observed when running micro benchmarks, even > with the sa

[go-nuts] How to reduce the fluctuation of micro benchmark results

2020-01-07 Thread Xiangdong JI
Hi, Significant fluctuation is observed when running micro benchmarks, even with the same version of go, e.g the following numbers from math/big package, could anyone please share practices that may help generate stable result? FloatAdd/1-64 669ns ± 0% 676ns ± 1%

[go-nuts] Re: Is a public go benchmarking database/dashboard available

2019-12-08 Thread Xiangdong JI
#x27; one but looking for data that could provide supplementary information. https://perf.golang.org/ is the only one I found so far, but its benchmarks seem to be private. Thanks. On Friday, December 6, 2019 at 9:28:28 AM UTC+8, Tong Sun wrote: > > > > On Monday, December 2, 2019 at

[go-nuts] Is a public go benchmarking database/dashboard available

2019-12-02 Thread Xiangdong JI
Hi, Wondering if there is any public database/dashboard of Go's benchmarking data available? Thanks. -- 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

[go-nuts] question about 'go vet ' with flag specifying 'analyzer'

2019-11-20 Thread Xiangdong JI
Hi, When I run 'go vet' on specific package with the 'analyzer' flag, its behavior seems to depend on where the command is invoked, can anyone please shed a light here, any code pointers that may help me understand the difference is highly appreciated. 1. under /src, -unreachable=false suppres

[go-nuts] Re: Any way to print a 'struct g' within delve/gdb

2019-11-12 Thread Xiangdong JI
syntax you're looking for is > ` *(*runtime.g)()`. Hope that helps! > > On Monday, November 11, 2019 at 11:29:42 PM UTC-8, Xiangdong JI wrote: >> >> Hi Derek, >> >> Say I have the pointer value of a specific G struct, how to convert it to >> 'struct

[go-nuts] Re: Any way to print a 'struct g' within delve/gdb

2019-11-11 Thread Xiangdong JI
can also open an issue on the Delve Github repo and we can help you out > over there as well. > > On Sunday, November 10, 2019 at 11:58:24 PM UTC-8, Xiangdong JI wrote: >> >> Given a valid goroutine structure's pointer, say retrieving from the >> register 'g&#x

[go-nuts] Any way to print a 'struct g' within delve/gdb

2019-11-10 Thread Xiangdong JI
Given a valid goroutine structure's pointer, say retrieving from the register 'g', how can I convert it to 'struct g' in delve or gdb? gdb usually reports "A syntax error in expression ...", and delve issues various "Command failed" message (failed to figure the proper way of converting a liter

Re: [go-nuts] Any non-split 'print' functions available?

2019-10-31 Thread Xiangdong JI
Thanks Ian, having difficulty figuring out how to print a pointer using write1, could you please shed a light? Thanks. On Friday, November 1, 2019 at 2:00:04 PM UTC+8, Ian Lance Taylor wrote: > > On Thu, Oct 31, 2019 at 5:10 AM Xiangdong JI > wrote: > > > > seeking uti

[go-nuts] Any non-split 'print' functions available?

2019-10-31 Thread Xiangdong JI
seeking utilities for diagnosing some 'nosplit' runtime functions. Thanks a lot. -- 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...@googlegr

[go-nuts] 'print' in runtime code causes panic "newstack at runtime.printlock" and "morestack on g0"

2019-10-31 Thread Xiangdong JI
Hi, A few 'print' statements in runtime for diagnosing result in panic like the following, what could be the root cause? any alternatives to display g's value? Thanks a lot. 1 g := getg() // existing code 2 print(g, g.stack.lo, g.stack.hi)// new l

Re: [go-nuts] How to invoke child 'go' process in playground?

2019-10-11 Thread Xiangdong JI
For example, try to execute > > exec.Command("/bin/ls", "-la") > > You'll get a "not implemented on nacl" error. See > https://blog.golang.org/playground > > On Fri, Oct 11, 2019 at 8:34 PM Xiangdong JI > wrote: > >> Hi, >

[go-nuts] How to invoke child 'go' process in playground?

2019-10-11 Thread Xiangdong JI
Hi, Given a command execution like "cmd := exec.CommandContext(ctx, "go", "run", file)" playground reports the following error: child error: exec: "go": executable file not found in $PATH Could it be solved by specifying a full path for 'go', which path shall I use? Thanks a lot. https://pla

Re: [go-nuts] lots of 'undeclared name' errors with vscode/gopls

2019-09-27 Thread Xiangdong JI
, September 27, 2019 at 2:50:11 PM UTC+8, MUNGAI wrote: > > Hi, had the same issue when using Go modules. Does your project have > modules? > > Also, check GOPATH and GROOT setting. > > On Fri, Sep 27, 2019, 8:21 AM Xiangdong JI > > wrote: > >> Hi, >> >&

[go-nuts] Building go 1.13 on aarch64 failed in pkg testing

2019-08-28 Thread Xiangdong JI
Hello, I got the following error while building the latest source code (synced to d0eaec79f9) on aarch64, both cache and /tmp/go-build* had been cleaned in advance, can anyone shed a light? Thanks a lot. go tool dist: unexpected stale targets reported by go list -gcflags="" -ldflags="" for [st

Re: [go-nuts] what do init functions like "math ~math" in .gox refer to?

2019-08-20 Thread Xiangdong JI
Thanks Ian. Curious to know the purpose of those dummy functions, and for the 'import' functions do they have real function bodies? On Wednesday, August 21, 2019 at 12:40:44 PM UTC+8, Ian Lance Taylor wrote: > > On Tue, Aug 20, 2019 at 9:12 PM Xiangdong JI > wrote: > &g

[go-nuts] Re: Patch RFA: [C family frontend]: avoid weird constant values in libgo/sysinfo.go

2019-08-20 Thread Xiangdong JI
Thanks a lot, Ian. the schedule is fine. On Wednesday, August 21, 2019 at 7:37:10 AM UTC+8, Ian Lance Taylor wrote: > > On Mon, Aug 12, 2019 at 8:21 PM Xiangdong JI > wrote: > > > > The .go files generated during building gccgo seem to have a few > constants with w

[go-nuts] what do init functions like "math ~math" in .gox refer to?

2019-08-20 Thread Xiangdong JI
Hello, In 'init' section of .gox files, there might be functions like the followings besides those 'import', math ~math bits ~math..z2fbits atomic ~runtime..z2finternal..z2fatomic where and how are those functions generated, any source code or doc I can refer to? Thanks. -- Y

[go-nuts] [gccgo] weird constant values in sysinfo.go

2019-08-12 Thread Xiangdong JI
Hello, The .go files generated during building gccgo seem to have a few constants with weird values, for example: // sysinfo.go (on x86-64, latest gcc-9 trunk) const ___FLT128_MAX__ = 1.1 const ___FLT32X_DENORM_MIN__ = 1.1 as a comparison, gollvm generates expected values. Could it be caused b

[go-nuts] [gollvm] build failure (mangled name of 'prefetch' inconsistent between llvm and gollvm)

2019-08-02 Thread Xiangdong JI
Hello, I got a build failures after syncing llvm, gollvm and gofront-end to their latest commits, llvm-goc errors out: = Intrinsic name not mangled correctly for type arguments! Should be: llvm.prefetch.p0i8 void (i8*, i32, i32, i3

[go-nuts] [gollvm] compiling error of libgo/runtime/aeshash.c on ARM

2019-07-15 Thread Xiangdong Ji
Hello, I am trying to build gollvm on ARM with a few experimental changes, looks like some ARM Neon intrinsics in libgo/runtime/aeshash.c are not supported by GCC 7/8, wondering if it could be solved by any additional compile options, or should the latest gcc-9 or clang be used? clang could com