Skip to content

Add API and example Notebook for Kernel functions profiling

Created by: derkling

Since this commit: 082a82c7 ftrace: add support to report function profiling data devlib provides support to profile a list of specified kernel functions by specifying them in the TestEnv configurations, e.g.

my_conf = {
    #... other settings ...
    "ftrace" : {
        "functions" : [
            "select_task_rq_fair",
            "pick_next_task_fair",
        ],
    },
}

This patch adds the required support from the LISA side to parse the functions profiling data and return a data frame for a specified list of functions.

With such a configuration, functions profiling data can be collected using this API:

# Collect and keep track of the performance data
stats_file = os.path.join(te.res_dir, 'trace.stats')
te.ftrace.get_stats(stats_file)

This series adds the required LISA support in Trace and TraceAnalysis to:

  1. build a DataFrame out of kernel functions profiling data
  2. plot kernel functions profiling data

Moreover, an example Notebook is added as well to show how to use the new API.

Merge request reports