[lkml]   [2019]   [Oct]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
Patch in this message
Subject[PATCH 5.3 104/344] perf config: Honour $PERF_CONFIG env var to specify alternate .perfconfig
From: Arnaldo Carvalho de Melo <>

[ Upstream commit 61a461fcbd62d42c29a1ea6a9cc3838ad9f49401 ]

We had this comment in Documentation/perf_counter/config.c, i.e. since
when we got this from the git sources, but never really did that
getenv("PERF_CONFIG"), do it now as I need to disable whatever
~/.perfconfig root has so that tests parsing tool output are done for
the expected default output or that we specify an alternate config file
that when read will make the tools produce expected output.

Cc: Adrian Hunter <>
Cc: Jiri Olsa <>
Cc: Luis Cláudio Gonçalves <>
Cc: Namhyung Kim <>
Cc: Taeung Song <>
Fixes: 078006012401 ("perf_counter tools: add in basic glue from Git")
Signed-off-by: Arnaldo Carvalho de Melo <>
Signed-off-by: Sasha Levin <>
tools/perf/perf.c | 3 +++
1 file changed, 3 insertions(+)

diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index 97e2628ea5dd1..d4e4d53e8b44b 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -441,6 +441,9 @@ int main(int argc, const char **argv)


+ /* Setting $PERF_CONFIG makes perf read _only_ the given config file. */
+ config_exclusive_filename = getenv("PERF_CONFIG");
err = perf_config(perf_default_config, NULL);
if (err)
return err;

 \ /
  Last update: 2019-10-03 19:03    [W:0.638 / U:0.556 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site