diff options
author | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2025-01-21 08:37:39 +0300 |
---|---|---|
committer | Dmitry Torokhov <dmitry.torokhov@gmail.com> | 2025-01-21 08:37:39 +0300 |
commit | 25768de50b1f2dbb6ea44bd5148a87fe2c9c3688 (patch) | |
tree | 91f4e0c1ea9acb1e8d477a5f4dfedd00de67ae13 /tools/perf/scripts/python/Perf-Trace-Util/Context.c | |
parent | 3a6e5ed2372bcb2a3c554fda32419efd91ff9b0c (diff) | |
parent | 08bd5b7c9a2401faabdaa1472d45c7de0755fd7e (diff) | |
download | linux-25768de50b1f2dbb6ea44bd5148a87fe2c9c3688.tar.xz |
Merge branch 'next' into for-linus
Prepare input updates for 6.14 merge window.
Diffstat (limited to 'tools/perf/scripts/python/Perf-Trace-Util/Context.c')
-rw-r--r-- | tools/perf/scripts/python/Perf-Trace-Util/Context.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/tools/perf/scripts/python/Perf-Trace-Util/Context.c b/tools/perf/scripts/python/Perf-Trace-Util/Context.c index 3954bd1587ce..01f54d6724a5 100644 --- a/tools/perf/scripts/python/Perf-Trace-Util/Context.c +++ b/tools/perf/scripts/python/Perf-Trace-Util/Context.c @@ -12,6 +12,7 @@ #define PY_SSIZE_T_CLEAN #include <Python.h> +#include "../../../util/config.h" #include "../../../util/trace-event.h" #include "../../../util/event.h" #include "../../../util/symbol.h" @@ -182,6 +183,15 @@ static PyObject *perf_sample_srccode(PyObject *obj, PyObject *args) return perf_sample_src(obj, args, true); } +static PyObject *__perf_config_get(PyObject *obj, PyObject *args) +{ + const char *config_name; + + if (!PyArg_ParseTuple(args, "s", &config_name)) + return NULL; + return Py_BuildValue("s", perf_config_get(config_name)); +} + static PyMethodDef ContextMethods[] = { #ifdef HAVE_LIBTRACEEVENT { "common_pc", perf_trace_context_common_pc, METH_VARARGS, @@ -199,6 +209,7 @@ static PyMethodDef ContextMethods[] = { METH_VARARGS, "Get source file name and line number."}, { "perf_sample_srccode", perf_sample_srccode, METH_VARARGS, "Get source file name, line number and line."}, + { "perf_config_get", __perf_config_get, METH_VARARGS, "Get perf config entry"}, { NULL, NULL, 0, NULL} }; |