mirror of
https://github.com/gperftools/gperftools
synced 2024-12-22 15:22:07 +00:00
a9b734e3fa
As part of cpu profiler we're extracting current PC (program counter) of out signal's ucontext. Different OS and hardware combinations have different ways for that. We had a list of variants that we tested at compile time and populated PC_FROM_UCONTEXT macro into config.h. It caused duplication and occasional mismatches between our autoconf and cmake bits. So this commit changes testing to be compile-time. We remove complexity from build system and add some to C++ source. We use SFINAE to find which of those variants compile (and we silently assume that 'compiles' implies 'works'; this is what config-time testing did too). Occasionally we'll face situations where several variants compile. And we couldn't handle this case in pure C++. So we have a small Ruby program that generates chain of inheritance among SFINAE-specialized class templates. This handles prioritization among variants. List of ucontext->pc extraction variants is mostly same. We dropped super-obsolete (circa Linux kernel 2.0) arm variant. And NetBSD case is now improved. We now use their nice architecture-independent macro instead of x86-specific access. |
||
---|---|---|
.. | ||
ac_have_attribute.m4 | ||
acx_nanosleep.m4 | ||
ax_cxx_compile_stdcxx.m4 | ||
ax_pthread.m4 | ||
install_prefix.m4 | ||
libtool.patch | ||
program_invocation_name.m4 |