[go-nuts] Re: gc: optimize JMP to RET instructions

2024-08-13 Thread 'Keith Randall' via golang-nuts
We generally don't do optimizations like that directly on assembly. In fact, we used to do some like that but they have been removed. We want the generated machine code to faithfully mirror the assembly input. People writing assembly have all kind of reasons for laying out instructions in partic

Re: [go-nuts] Advice on Using Pure Go with eBPF

2024-08-13 Thread burak serdar
As far as I know, you cannot write ebpf code using Go. You can write C code for ebpf filters, and then use Go to install it and interface with it. Take a look at Cilium tools. You might also want to take a look at https://github.com/kubeshark/tracer. On Tue, Aug 13, 2024 at 4:55 PM Sharon Mafgaoke

[go-nuts] Advice on Using Pure Go with eBPF

2024-08-13 Thread Sharon Mafgaoker
Hey Everyone, Nice to e-meet you all! I'm new here and kindly asking for some advice on a topic I'm exploring. While watching Rob Pike's videos about Go, I noticed he doesn't recommend using CGO due to potential issues when changing OS/architecture. I have an idea to read incoming IPs, perfo

[go-nuts] Re: Go 1.23.0 is released

2024-08-13 Thread x
That's great! I've being waiting for iterators for long. On Tuesday, August 13, 2024 at 11:03:29 AM UTC-6 anno...@golang.org wrote: > Hello gophers, > > We have just released Go 1.23.0. > > To find out what has changed in Go 1.23, read the release notes: > https://go.dev/doc/go1.23 > > You can dow

[go-nuts] gc: optimize JMP to RET instructions

2024-08-13 Thread Arseny Samoylov
Hello community, recently I found that gc generates a lot of JMP to RET instructions and there is no optimization for that. Consider this example: ``` // asm_arm64.s #include "textflag.h" TEXT ·jmp_to_ret(SB), NOSPLIT, $0-0 JMP *ret* ret: *RET* *```* This compiles to : ``` TE

[go-nuts] Go 1.23.0 is released

2024-08-13 Thread announce
Hello gophers, We have just released Go 1.23.0. To find out what has changed in Go 1.23, read the release notes: https://go.dev/doc/go1.23 You can download binary and source distributions from our download page: https://go.dev/dl/#go1.23.0 If you have Go installed already, an easy way to try go