Skip to contentSkip to conversation

perf config: Tidy up the code setting buildid dir

PATCH In review Taeung Song 2 participants 3 messages Mar 24, 2016 – Mar 27, 2016 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf config: Tidy up the code setting buildid dir

Add new perf_buildid_config() into perf_default_config, bring set_buildid_dir() next to perf_default_config, rename some variable name as more readable name and etc in order to clean up code about buildid dir.

Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
---
 tools/perf/perf.c        |  3 +--
 tools/perf/util/config.c | 57 +++++++++++++++++++-----------------------------
 2 files changed, 23 insertions(+), 37 deletions(-)
tools/perf/perf.c +1 -2
index aaee0a7..7b2df2b 100644
@@ -549,6 +549,7 @@ int main(int argc, const char **argv)
 	srandom(time(NULL));
 
 	perf_config(perf_default_config, NULL);
+	set_buildid_dir(NULL);
 
 	/* get debugfs/tracefs mount point from /proc/mounts */
 	tracing_path_mount();
@@ -572,7 +573,6 @@ int main(int argc, const char **argv)
 	}
 	if (!prefixcmp(cmd, "trace")) {
 #ifdef HAVE_LIBAUDIT_SUPPORT
-		set_buildid_dir(NULL);
 		setup_path();
 		argv[0] = "trace";
 		return cmd_trace(argc, argv, NULL);
@@ -587,7 +587,6 @@ int main(int argc, const char **argv)
 	argc--;
 	handle_options(&argv, &argc, NULL);
 	commit_pager_choice();
-	set_buildid_dir(NULL);
 
 	if (argc > 0) {
 		if (!prefixcmp(argv[0], "--"))
tools/perf/util/config.c +22 -35

83 lines not on this page · raw message

Signature · 1 line
2.5.0
#1 lore raw
Quoted 5 lines · Taeung Song

Add new perf_buildid_config() into perf_default_config, bring set_buildid_dir() next to perf_default_config, rename some variable name as more readable name and etc in order to clean up code about buildid dir.

Quoted 8 lines
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
---
 tools/perf/perf.c        |  3 +--
 tools/perf/util/config.c | 57 +++++++++++++++++++-----------------------------
 2 files changed, 23 insertions(+), 37 deletions(-)

though it's failry simple change we try to separate changes

seems like 3 independent changes:

- perf.c hunk change
- buildid_dir_command_config/perf_buildid_config rework
- set_buildid_dir fix

thanks,
jirka

#2 lore raw

Hi, jirka

Thank you for your review :-)

Quoted 15 lines · Jiri Olsa
Quoted 5 lines · Taeung Song

Add new perf_buildid_config() into perf_default_config, bring set_buildid_dir() next to perf_default_config, rename some variable name as more readable name and etc in order to clean up code about buildid dir.

Quoted 8 lines
Cc Jiri Olsa <[email protected]>
Cc Namhyung Kim <[email protected]>
Cc Wang Nan <[email protected]>
---
  tools/perf/perf.c        |  3 +--
  tools/perf/util/config.c | 57 +++++++++++++++++++-----------------------------
  2 files changed, 23 insertions(+), 37 deletions(-)
Quoted 8 lines

though it's failry simple change we try to separate changes

seems like 3 independent changes:

- perf.c hunk change
- buildid_dir_command_config/perf_buildid_config rework
- set_buildid_dir fix

You mean it is needed to separate this patch as 3 part? I got it.

I'll resend the patchset.

Thanks,
Taeung