M7350/qcom-opensource/kernel/kernel-tests/memory_prof/hostscripts/README
2024-09-09 08:57:42 +00:00

83 lines
2.0 KiB
Plaintext

parse_memory_prof_results.py:
=============================
parse_memory_prof_results.py produces histograms and/or graphs from the
output of the `memory_prof -e' test.
USAGE:
See `parse_memory_prof_results.py -h'
DEPENDECIES:
- Python package: matplotlib (only required for graphical
plots)
- Python package: numpy (only required for graphical plots)
TARGETS:
Applicable on all targets where the memory_prof test runs.
tracepoint_parser.sh:
=====================
tracepoint_parser.sh runs the memory_prof kernel test with
some interesting memory-related ftrace events enabled. It then
parses the log and outputs some statistics regarding
high-order page allocation ratios, allocation failure ratios,
etc.
USAGE:
See `tracepoint_parser.sh -h'
DEPENDENCIES:
- Kernel config: CONFIG_FTRACE
TARGETS:
Applicable on all targets where the memory_prof test runs.
trace_2_alloc_profile.py
========================
trace_2_alloc_profile.py converts ftrace logs into allocation
profiles suitable for usage with `memory_prof -e -i'.
Quickstart guide:
1) Enable Ion tracepoints
# (device) echo function > /sys/kernel/debug/current_tracer
# (device) echo 1 > /sys/kernel/debug/tracing/events/kmem/enable
2) Run your use case on the device
3) Download the trace file (adb pull, or similar)
$ (host) adb pull /sys/kernel/debug/tracing/trace
4) Stop tracing
# (device) echo 0 > /sys/kernel/debug/tracing/events
# (device) echo nop > /sys/kernel/debug/current_tracer
5) Run the downloaded trace through trace_2_alloc_profile.py
$ (host) python2 trace_2_alloc_profile.py trace
USAGE:
See Quickstart above and `trace_2_alloc_profile.py -h'
DEPENDENCIES:
- Kernel config: CONFIG_FTRACE
TARGETS:
Applicable on all targets where the memory_prof test runs.