Closed AlexGustafsson closed 3 years ago
This seems like a reasonable change. In case it's useful, if you have your compiler provide debugging information (usually -g
flag) then perforator should be able to profile inlined functions.
I added (and then removed) a log mentioning the missing function. I noticed it was already logged, so please disregard the latest changes.
I've added a flag,
--ignore-missing-regions
, which will allow perforator to continue running even though it's unable to find a region.The change is non-breaking.
The use case is times where you compare a non-optimized reference implementation with an optimized (
-O3
or the like) implementation. In the latter case, GCC and friends may happily inline functions that are only used a single time. This results in the binary (symbol table) not containing the symbol at all - since it's no longer a function per say.With this change, one may use
--ignore-missing-regions
to run both binaries with the same perforator command, making it more useful in scripts where it may be unknown if the target binary lacks a specific region.