To use gprof, we pass -pg flag to GCC so some instrumentation code will be inserted into each functions. I'm curious about the possibility of inserting customized code into each function. For example, to measure the time of a critical path, I need to insert code manually into functions along the critical path, I want to make this process automatic. So my question is: Is it possible to insert customized code into each or selected functions using gcc/clang plugin?
https://stackoverflow.com/questions/65912370/is-it-possible-to-insert-code-into-each-or-selected-functions-using-gcc-clang-pl January 27, 2021 at 11:07AM
没有评论:
发表评论