Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1365147 > unrolled thread

[PATCH 1/3] perf config: Remove duplicated the code calling set_buildid_dir

Started byTaeung Song <treeze.taeung@gmail.com>
First post2016-03-27 19:30 +0200
Last post2016-03-31 09:00 +0200
Articles 7 — 4 participants

Back to article view | Back to linux.kernel


Contents

  [PATCH 1/3] perf config: Remove duplicated the code calling set_buildid_dir Taeung Song <treeze.taeung@gmail.com> - 2016-03-27 19:30 +0200
    [PATCH 3/3] perf config: Rename 'v' to 'home' at set_buildid_dir Taeung Song <treeze.taeung@gmail.com> - 2016-03-27 19:30 +0200
      [tip:perf/core] perf config: Rename 'v' to 'home' in  set_buildid_dir() tip-bot for Taeung Song <tipbot@zytor.com> - 2016-03-31 09:00 +0200
    Re: [PATCH 1/3] perf config: Remove duplicated the code calling  set_buildid_dir Jiri Olsa <jolsa@redhat.com> - 2016-03-28 22:00 +0200
      Re: [PATCH 1/3] perf config: Remove duplicated the code calling  set_buildid_dir Arnaldo Carvalho de Melo <acme@kernel.org> - 2016-03-28 23:10 +0200
        Re: [PATCH 1/3] perf config: Remove duplicated the code calling  set_buildid_dir Taeung Song <treeze.taeung@gmail.com> - 2016-03-29 02:00 +0200
    [tip:perf/core] perf config: Remove duplicated set_buildid_dir  calls tip-bot for Taeung Song <tipbot@zytor.com> - 2016-03-31 09:00 +0200

#1365147 — [PATCH 1/3] perf config: Remove duplicated the code calling set_buildid_dir

FromTaeung Song <treeze.taeung@gmail.com>
Date2016-03-27 19:30 +0200
Subject[PATCH 1/3] perf config: Remove duplicated the code calling set_buildid_dir
Message-ID<rhmFI-35B-7@gated-at.bofh.it>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
---
 tools/perf/perf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index aaee0a7..7b2df2b 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -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], "--"))
-- 
2.5.0

[toc] | [next] | [standalone]


#1365148 — [PATCH 3/3] perf config: Rename 'v' to 'home' at set_buildid_dir

FromTaeung Song <treeze.taeung@gmail.com>
Date2016-03-27 19:30 +0200
Subject[PATCH 3/3] perf config: Rename 'v' to 'home' at set_buildid_dir
Message-ID<rhmFI-35B-13@gated-at.bofh.it>
In reply to#1365147
Change a variable name 'v' to
'home' to be more readable name.

Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
---
 tools/perf/util/config.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index 2dd78f4..5c20d78 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -540,10 +540,11 @@ void set_buildid_dir(const char *dir)
 
 	/* default to $HOME/.debug */
 	if (buildid_dir[0] == '\0') {
-		char *v = getenv("HOME");
-		if (v) {
+		char *home = getenv("HOME");
+
+		if (home) {
 			snprintf(buildid_dir, MAXPATHLEN-1, "%s/%s",
-				 v, DEBUG_CACHE_DIR);
+				 home, DEBUG_CACHE_DIR);
 		} else {
 			strncpy(buildid_dir, DEBUG_CACHE_DIR, MAXPATHLEN-1);
 		}
-- 
2.5.0

[toc] | [prev] | [next] | [standalone]


#1367880 — [tip:perf/core] perf config: Rename 'v' to 'home' in set_buildid_dir()

Fromtip-bot for Taeung Song <tipbot@zytor.com>
Date2016-03-31 09:00 +0200
Subject[tip:perf/core] perf config: Rename 'v' to 'home' in set_buildid_dir()
Message-ID<riEKe-Xu-19@gated-at.bofh.it>
In reply to#1365148
Commit-ID:  37194f443a5a7157866ba68b04827e111100167b
Gitweb:     http://git.kernel.org/tip/37194f443a5a7157866ba68b04827e111100167b
Author:     Taeung Song <treeze.taeung@gmail.com>
AuthorDate: Mon, 28 Mar 2016 02:22:20 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 30 Mar 2016 11:14:09 -0300

perf config: Rename 'v' to 'home' in set_buildid_dir()

Change the variable name 'v' to 'home' to make it more readable.

Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1459099340-16911-3-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/util/config.c | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/tools/perf/util/config.c b/tools/perf/util/config.c
index 2dd78f4..5c20d78 100644
--- a/tools/perf/util/config.c
+++ b/tools/perf/util/config.c
@@ -540,10 +540,11 @@ void set_buildid_dir(const char *dir)
 
 	/* default to $HOME/.debug */
 	if (buildid_dir[0] == '\0') {
-		char *v = getenv("HOME");
-		if (v) {
+		char *home = getenv("HOME");
+
+		if (home) {
 			snprintf(buildid_dir, MAXPATHLEN-1, "%s/%s",
-				 v, DEBUG_CACHE_DIR);
+				 home, DEBUG_CACHE_DIR);
 		} else {
 			strncpy(buildid_dir, DEBUG_CACHE_DIR, MAXPATHLEN-1);
 		}

[toc] | [prev] | [next] | [standalone]


#1365652 — Re: [PATCH 1/3] perf config: Remove duplicated the code calling set_buildid_dir

FromJiri Olsa <jolsa@redhat.com>
Date2016-03-28 22:00 +0200
SubjectRe: [PATCH 1/3] perf config: Remove duplicated the code calling set_buildid_dir
Message-ID<rhLup-3dJ-5@gated-at.bofh.it>
In reply to#1365147
On Mon, Mar 28, 2016 at 02:22:18AM +0900, Taeung Song wrote:
> Cc: Jiri Olsa <jolsa@kernel.org>
> Cc: Namhyung Kim <namhyung@kernel.org>
> Signed-off-by: Taeung Song <treeze.taeung@gmail.com>

for the patchset:

Acked-by: Jiri Olsa <jolsa@kernel.org>

thanks,
jirka

> ---
>  tools/perf/perf.c | 3 +--
>  1 file changed, 1 insertion(+), 2 deletions(-)
> 
> diff --git a/tools/perf/perf.c b/tools/perf/perf.c
> index aaee0a7..7b2df2b 100644
> --- a/tools/perf/perf.c
> +++ b/tools/perf/perf.c
> @@ -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], "--"))
> -- 
> 2.5.0
> 

[toc] | [prev] | [next] | [standalone]


#1365677 — Re: [PATCH 1/3] perf config: Remove duplicated the code calling set_buildid_dir

FromArnaldo Carvalho de Melo <acme@kernel.org>
Date2016-03-28 23:10 +0200
SubjectRe: [PATCH 1/3] perf config: Remove duplicated the code calling set_buildid_dir
Message-ID<rhMAa-4dD-15@gated-at.bofh.it>
In reply to#1365652
Em Mon, Mar 28, 2016 at 09:52:42PM +0200, Jiri Olsa escreveu:
> On Mon, Mar 28, 2016 at 02:22:18AM +0900, Taeung Song wrote:
> > Cc: Jiri Olsa <jolsa@kernel.org>
> > Cc: Namhyung Kim <namhyung@kernel.org>
> > Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
> 
> for the patchset:
> 
> Acked-by: Jiri Olsa <jolsa@kernel.org>

Thanks, applied.

[toc] | [prev] | [next] | [standalone]


#1365719 — Re: [PATCH 1/3] perf config: Remove duplicated the code calling set_buildid_dir

FromTaeung Song <treeze.taeung@gmail.com>
Date2016-03-29 02:00 +0200
SubjectRe: [PATCH 1/3] perf config: Remove duplicated the code calling set_buildid_dir
Message-ID<rhPeF-62V-1@gated-at.bofh.it>
In reply to#1365677
Hi, jirka and Arnaldo

On 03/29/2016 05:59 AM, Arnaldo Carvalho de Melo wrote:
> Em Mon, Mar 28, 2016 at 09:52:42PM +0200, Jiri Olsa escreveu:
>> On Mon, Mar 28, 2016 at 02:22:18AM +0900, Taeung Song wrote:
>>> Cc: Jiri Olsa <jolsa@kernel.org>
>>> Cc: Namhyung Kim <namhyung@kernel.org>
>>> Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
>>
>> for the patchset:
>>
>> Acked-by: Jiri Olsa <jolsa@kernel.org>
>
> Thanks, applied.

Thank you !! :-)

Taeung

[toc] | [prev] | [next] | [standalone]


#1367889 — [tip:perf/core] perf config: Remove duplicated set_buildid_dir calls

Fromtip-bot for Taeung Song <tipbot@zytor.com>
Date2016-03-31 09:00 +0200
Subject[tip:perf/core] perf config: Remove duplicated set_buildid_dir calls
Message-ID<riEKf-Xu-43@gated-at.bofh.it>
In reply to#1365147
Commit-ID:  58cb9d650be45100bf53ddf9e00351391de3d735
Gitweb:     http://git.kernel.org/tip/58cb9d650be45100bf53ddf9e00351391de3d735
Author:     Taeung Song <treeze.taeung@gmail.com>
AuthorDate: Mon, 28 Mar 2016 02:22:18 +0900
Committer:  Arnaldo Carvalho de Melo <acme@redhat.com>
CommitDate: Wed, 30 Mar 2016 11:14:08 -0300

perf config: Remove duplicated set_buildid_dir calls

Signed-off-by: Taeung Song <treeze.taeung@gmail.com>
Acked-by: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Cc: Peter Zijlstra <peterz@infradead.org>
Link: http://lkml.kernel.org/r/1459099340-16911-1-git-send-email-treeze.taeung@gmail.com
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>
---
 tools/perf/perf.c | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/tools/perf/perf.c b/tools/perf/perf.c
index aaee0a7..7b2df2b 100644
--- a/tools/perf/perf.c
+++ b/tools/perf/perf.c
@@ -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], "--"))

[toc] | [prev] | [standalone]


Back to top | Article view | linux.kernel


csiph-web