Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S965655AbaDJQx2 (ORCPT ); Thu, 10 Apr 2014 12:53:28 -0400 Received: from smtp.gentoo.org ([140.211.166.183]:51012 "EHLO smtp.gentoo.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753011AbaDJQx1 (ORCPT ); Thu, 10 Apr 2014 12:53:27 -0400 From: Richard Yao To: Peter Zijlstra Cc: Paul Mackerras , Ingo Molnar , Arnaldo Carvalho de Melo , Adrian Hunter , David Ahern , Jiri Olsa , Stephane Eranian , Frederic Weisbecker , linux-kernel@vger.kernel.org, Richard Yao Subject: [PATCH] perf machine: Search for modules in %s/lib/modules/%s Date: Thu, 10 Apr 2014 12:52:59 -0400 Message-Id: <1397148779-9169-1-git-send-email-ryao@gentoo.org> X-Mailer: git-send-email 1.8.3.2 Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Modules installed outside of the kernel's build system should go into "%s/lib/modules/%s/extra", but at present, perf will only look at them when they are in "%s/lib/modules/%s/kernel". Lets encourage good citizenship by relaxing this requirement to "%s/lib/modules/%s". This way open source modules that are out-of-tree have no incentive to start populating a directory reserved for in-kernle modules and I can stop hex editing my system's perf binary when profiling OSS out-of-tree modules. Signed-off-by: Richard Yao --- tools/perf/util/machine.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/perf/util/machine.c b/tools/perf/util/machine.c index a53cd0b..116842e 100644 --- a/tools/perf/util/machine.c +++ b/tools/perf/util/machine.c @@ -786,7 +786,7 @@ static int machine__set_modules_path(struct machine *machine) if (!version) return -1; - snprintf(modules_path, sizeof(modules_path), "%s/lib/modules/%s/kernel", + snprintf(modules_path, sizeof(modules_path), "%s/lib/modules/%s", machine->root_dir, version); free(version); -- 1.8.3.2 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/