mirror of
https://github.com/gperftools/gperftools
synced 2025-01-17 20:32:11 +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. |
||
---|---|---|
.. | ||
addressmap_unittest.cc | ||
check_address_test.cc | ||
current_allocated_bytes_test.cc | ||
debugallocation_test.cc | ||
debugallocation_test.sh | ||
frag_unittest.cc | ||
getpc_test.cc | ||
heap-checker_unittest.cc | ||
heap-checker-death_unittest.sh | ||
heap-profiler_unittest.cc | ||
heap-profiler_unittest.sh | ||
large_heap_fragmentation_unittest.cc | ||
low_level_alloc_unittest.cc | ||
malloc_extension_c_test.cc | ||
malloc_extension_test.cc | ||
malloc_hook_test.cc | ||
markidle_unittest.cc | ||
memalign_unittest.cc | ||
mmap_hook_test.cc | ||
packed-cache_test.cc | ||
page_heap_test.cc | ||
pagemap_unittest.cc | ||
profile-handler_unittest.cc | ||
profiledata_unittest.cc | ||
profiler_unittest.cc | ||
profiler_unittest.sh | ||
raw_printer_test.cc | ||
realloc_unittest.cc | ||
safe_strerror_test.cc | ||
sampler_test.cc | ||
sampling_test.cc | ||
sampling_test.sh | ||
simple_compat_test.cc | ||
stack_trace_table_test.cc | ||
stacktrace_unittest.cc | ||
system-alloc_unittest.cc | ||
tcmalloc_large_unittest.cc | ||
tcmalloc_unittest.cc | ||
tcmalloc_unittest.sh | ||
testutil.cc | ||
testutil.h | ||
thread_dealloc_unittest.cc | ||
unique_path_unittest.cc |