I'm trying to profile with perf on Ubuntu 20.04, but the problem is that many functions do not appear in it (likely because they are inlined), or only their addresses appear (without names etc.). I'm using CMake's RelWithDebInfo build. But there are some template functions that I don't know how to bring to the profiler results. I think marking them noinline may help if this is legal in C++ for template functions, but this screws up the codebase and needs to be done per-function. Any suggestions how to make all functions noinline at once?
Can I make a template function noinline or else force it to appear in the profiler?
789 Views Asked by Serge Rogatch At
2
There are 2 best solutions below
Related Questions in C++
- How to immediately apply DISPLAYCONFIG_SCALING display scaling mode with SetDisplayConfig and DISPLAYCONFIG_PATH_TARGET_INFO
- Why can't I use templates members in its specialization?
- How to fix "Access violation executing location" when using GLFW and GLAD
- Dynamic array of structures in C++/ cannot fill a dynamic array of doubles in structure from dynamic array of structures
- How do I apply the interface concept with the base-class in design?
- File refuses to compile std::erase() even if using -std=g++23
- How can I do a successful map when the number of elements to be mapped is not consistent in Thrust C++
- Can std::bit_cast be applied to an empty object?
- Unexpected inter-thread happens-before relationships from relaxed memory ordering
- How i can move element of dynamic vector in argument of function push_back for dynamic vector
- Brick Breaker Ball Bounce
- Thread-safe lock-free min where both operands can change c++
- Watchdog Timer Reset on ESP32 using Webservers
- How to solve compiler error: no matching function for call to 'dmhFS::dmhFS()' in my case?
- Conda CMAKE CXX Compiler error while compiling Pytorch
Related Questions in CMAKE
- Build issue in my STM32-NUCLEO project using the Eclipse IDE
- CMake: "dereference" INCLUDE commands to create a single CMakeLists.txt
- Conda CMAKE CXX Compiler error while compiling Pytorch
- How to setup nist nbis in raspbian raspberry pi 4
- Compiling c++ code by VS Code is always blocked by clang-tidy error 'Error running 'clang-tidy'
- library X11_Xmu_LIB is not found
- Cannot build a basic project with curl on Mac (M2) for Raspberry Pi Pico
- How to install spdlog library?
- How to generate vulkan project so it is cross-platform? (Using CMake)
- If target A depends on B, are B's POST_BUILD commands guaranteed to be executed before A starting to build?
- i have installed qt version 6.0.3 and this error QMYSQL driver not loaded displaying again and again
- Configure CmakeLists.txt to avoid manually copying dlls
- Cmake is not building an executable
- How to use "wx_dpi_aware.manifest" of wxWidgets wxMSW with MinGW and CMake?
- Try to Install GLFW on Steam Deck
Related Questions in PROFILING
- Error Using Valgrind's callgrind and kcachegrind on a C++
- what are the numbers in the operation names when profiling an application
- Node.js --cpu-prof flag: Failed to convert CPU profile message to V8 string
- Identifying the cause of poor training performance on RTX 4090
- perf -- record cache misses at thread level granularity
- Script to track network usage showing increased results when not sending packets
- Are anonymous functions optimized in node.js
- Why VTune fails with error `[Instrumentation Engine]: __libc_thread_freeres()`?
- How to profile integration tests in java
- Why "current_thread" identifier is not in "_current_frames" dictionary?
- Raspberry Pi 4: Uneven speed of GPIO bit-banging in C loop (RPi 4, 64bit)
- Why won't this duckdb query of s3/parquet data save 'EXPLAIN ANALYZE' profiling info?
- How to resolve Segmentation Fault in RISC-V Program
- What are tasks inside another task in DevTools profiler?
- Get trace of executed Instructions in Spike simulator
Related Questions in PERF
- Linux perf does not record function in libstdc++.so correctly
- perf -- record cache misses at thread level granularity
- x86/Linux multithreading: perf report children percentage sum does not match the parent percentage
- Is there a way to parse data generated by perf tool?
- How to measure execution time of all functions in a process using perf?
- linux perf: x86: is the cache-misses event accuracy in per-process counting?
- I cannot use perf in ubuntu2204 kernel6.6.17 with trying the solution most people meet
- perf stat -p pid does not work with PMU events
- Using perf inside podman container
- What does the event `stall_slot_backend` represent?
- Perf power consumption for a multi-socket system
- Perf and kallsyms in a GKE Ephemeral container
- Perf shows userspace cycles for cores which shouldn't be executing instructions
- Frequent Cache misses for loading data and accumulating Elements of std vector
- perf_event_open() always get zero when specifying CPU ID
Related Questions in DEBUG-INFORMATION
- EKS AMI kernel debug symbols
- LLVM debug info does not show proper function's pretty name
- Line number with exception logging for deployed apps
- My react native app crashes after compiling it to an APK
- JDI StackFrame.Location.lineNumber is missing. Is this due to missing debug information?
- how to build linux kernel with `allyesconfig` and debug information
- When compiling a Rust library with C++ extensions in debug mode, is the C++ code compiled with debug flags too?
- How can gdb on a remote host read source files from the host machine?
- Valgrind(memcheck) not showing all contexts
- Check if mac executable has debug info
- why are multiple line numbers mapped to the same starting address in .debug_line?
- Can I tell my compiler to "inline" a function also w.r.t. debug/source-line info?
- Why is it that assembling/linking in one step loses debug info for my assembly source?
- Specify MIPS floating-pointer registers in CFI directives
- When to use symbol stripping in Rust release builds?
Trending Questions
- UIImageView Frame Doesn't Reflect Constraints
- Is it possible to use adb commands to click on a view by finding its ID?
- How to create a new web character symbol recognizable by html/javascript?
- Why isn't my CSS3 animation smooth in Google Chrome (but very smooth on other browsers)?
- Heap Gives Page Fault
- Connect ffmpeg to Visual Studio 2008
- Both Object- and ValueAnimator jumps when Duration is set above API LvL 24
- How to avoid default initialization of objects in std::vector?
- second argument of the command line arguments in a format other than char** argv or char* argv[]
- How to improve efficiency of algorithm which generates next lexicographic permutation?
- Navigating to the another actvity app getting crash in android
- How to read the particular message format in android and store in sqlite database?
- Resetting inventory status after order is cancelled
- Efficiently compute powers of X in SSE/AVX
- Insert into an external database using ajax and php : POST 500 (Internal Server Error)
Popular # Hahtags
Popular Questions
- How do I undo the most recent local commits in Git?
- How can I remove a specific item from an array in JavaScript?
- How do I delete a Git branch locally and remotely?
- Find all files containing a specific text (string) on Linux?
- How do I revert a Git repository to a previous commit?
- How do I create an HTML button that acts like a link?
- How do I check out a remote Git branch?
- How do I force "git pull" to overwrite local files?
- How do I list all files of a directory?
- How to check whether a string contains a substring in JavaScript?
- How do I redirect to another webpage?
- How can I iterate over rows in a Pandas DataFrame?
- How do I convert a String to an int in Java?
- Does Python have a string 'contains' substring method?
- How do I check if a string contains a specific word?
You could add
-fno-inlinetoCMAKE_CXX_FLAGS.From GCC man page: