Does gccgo support the -finstrument-functions option and/or is there a non-gccgo equivalent?


I’m the author of Corelight cwrap on github which is an experimental tool to auto instrument C/C++ programs on Intel via the gcc -finstrument-functions option. Even large C++ programs with over 100,000 functions. I’m wondering how to achieve something similar with Golang programs?

I noticed that gccgo exists as an alternative Golang compiler, and might even support the gcc -finstrument-functions option, and somebody was hinting at trying to do this in this post [1].

Does anybody know if gccgo does support the -finstrument-functions option?

It also seems like gccgo is not available on macOS [2]? So based on the response to this post then I might have to switch to Linux to experiment further :slight_smile:

Lastly, regardless of gccgo, is there another technology and/or mechanism in the Golang ecosystem which might achieve a similar result without using the gccgo -finstrument-functions command line option?

Thanks in advance!


1 Like

Follow-on question:

If gccgo supports the -finstrument-functions command line option, does it play nicely with goroutines, or how can it be made to play nicely with goroutines?

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.