I want to measure performance of some kernel functions using Ftrace but I want to measure it selectively for particular value of argument. This is because the same/other programs calling the same function (but with different argument) pollute my Ftrace output logs. Also, I don't want to set PID filter as it would not solve my issue (I'm running multiple parallel kernel threads, and same program can also call that function with different arguments) What's the best possible way of doing it without affecting the measurements? Is there any Ftrace functionality (or possibly customizing the trace points) that I'm missing?
Logging the kernel Ftrace point selectively for particular arguments
316 Views Asked by shivank At
1
There are 1 best solutions below
Related Questions in LINUX
- Is there some way to use printf to print a horizontal list of decrementing hex digits in NASM assembly on Linux
- Why does Hugo generate different taxonomy-related HTML on different OS's?
- Writes in io_uring do not advance the file offset
- Why `set -o pipefail` gives different output even though the pipe is not failing
- what really controls the permissions: UID or eUID?
- Compiling eBPF program in Docker fails due to missing '__u64' type
- Docker container unable to make HTTPS requests to external API
- Whow to use callback_query_handler in Python 3.10
- Create kea runtime directory at startup in Yocto image
- Problem on CPU scheduling algorithms in OS
- How to copy files into the singularity sandbox?
- Android kernel error: undefined reference to `get_hw_version_platform'
- Is there a need for BPF Linux namespace?
- Error when trying to execute a binary compiled in a Kali Linux machine on an Ubuntu system
- Issue with launching application after updating ElectronJs to version 28.0.0 on Windows and Linux
Related Questions in PERFORMANCE
- Upsert huge amount of data by EFCore.BulkExtensions
- How can I resolve this error and work smoothly in deep learning?
- Efficiently processing many small elements of a collection concurrently in Java
- Theme Preloader for speed optimization in WordPress
- I need help to understand the time wich my simple ''hello world'' is taking to execute
- Non-blocking state update
- Do conditional checks cause bottlenecks in Javascript?
- Performance of sketch drastically decreases outside of the P5 Web Editor
- sample query for review for improvement on big query
- Is there an indexing strategy in Postgres which will operate effectively for JOINs with ORs
- Performance difference between two JavaScript code snippets for comparing arrays of strings
- C++ : Is there an objective universal way to compare the speed of iterative algorithms?
- How to configure api http request with load testing
- the difference in terms of performance two types of update in opensearch
- Sveltekit : really long to send the first page and intense CPU computation
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 FTRACE
- why does mcount require frame pointer information?
- Linux FTRACE function_graph process context
- ftrace into serial console during reboot
- File is cleared after preventing writing to it by hooking sys_write
- How to benchmark a C program
- Multi program use ftrace to hook same kernel function in same machine
- trace-cmd & ftrace: print only trace_printk output
- Systrace: When I open the systrace, I found that the information of SurfaceFlinger is not full,I just see a few information shown
- Using ftrace on Samsung smartphone
- How to use ftrace to print partial function trace?
- It is possible to grab process memory using ftrace?
- How to configure Ftrace on kernel 5.15.0-56-generic (ubuntu 22.04)?
- How can I use ftrace filtering to see the call stack above a function?
- What does the field irq indicate in the kvm_inj_virq event?
- How can I parse the output of trace-cmd report using awk?
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?
We can use Conditional Tracepoints for this kinds of case. This patch may also be helpful in understanding. One can check this file -
samples\trace_events\trace-events-sample.hin linux kernel to see sample examples.In
samples\trace_events\trace-events-sample.h, It became crystal-clear to me after seeing this macro -TRACE_EVENT_CONDITION(). Thanks to the author for providing a detailed documentation there.Moreover, one can use pre-defined event-tracepoints or define a new custom event tracepoint in
include/trace/events/*.hand filter the trace logs by adding condition inTRACE_DIR/tracing/events/EVENT/filter. This kernel documentation link is very helpful to understand this.