Skip to contentSkip to conversation

perf annotate: fix -i option, which is currently ignored.

PATCH In review Martin Liška 3 participants 12 messages May 29, 2015 perf events

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 perf annotate: fix -i option, which is currently ignored.

Assign input_name, received from program arguments, to file data structure.

---
 tools/perf/builtin-annotate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/builtin-annotate.c +2 -1
index c434e12..4e08c2d 100644
@@ -289,7 +289,6 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
 		},
 	};
 	struct perf_data_file file = {
-		.path  = input_name,
 		.mode  = PERF_DATA_MODE_READ,
 	};
 	const struct option options[] = {
@@ -346,6 +345,8 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
 	else if (annotate.use_gtk)
 		use_browser = 2;
 
+	file.path  = input_name;
+
 	setup_browser(true);
 
 	annotate.session = perf_session__new(&file, false, &annotate.tool);
Signature · 1 line
2.1.4
#1 lore raw

Em Fri, May 29, 2015 at 02:06:44PM +0200, Martin Liška escreveu:

Quoted 2 lines

Assign input_name, received from program arguments, to file data structure.

Doesn't apply:

pat[acme@zoo linux]$ patch -p1 < /wb/1.patch
patching file tools/perf/builtin-annotate.c
Hunk #1 FAILED at 289.
Hunk #2 FAILED at 346.
2 out of 2 hunks FAILED -- saving rejects to file
tools/perf/builtin-annotate.c.rej
[acme@zoo linux]$

What branch is this intended for? I.e. where have you cloned this from?

Yeah, I reproduced the problem and will try to figure this out, but please always be explicit where to apply this.

- Arnaldo

Quoted 26 lines
---
 tools/perf/builtin-annotate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/builtin-annotate.c +2 -1
index c434e12..4e08c2d 100644
@@ -289,7 +289,6 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
 		},
 	};
 	struct perf_data_file file = {
-		.path  = input_name,
 		.mode  = PERF_DATA_MODE_READ,
 	};
 	const struct option options[] = {
@@ -346,6 +345,8 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
 	else if (annotate.use_gtk)
 		use_browser = 2;
+	file.path  = input_name;
+
 	setup_browser(true);
 	annotate.session = perf_session__new(&file, false, &annotate.tool);
Signature · 1 line
2.1.4
#2 lore raw

Em Fri, May 29, 2015 at 09:42:41AM -0300, Arnaldo Carvalho de Melo escreveu:

Quoted 14 lines

Em Fri, May 29, 2015 at 02:06:44PM +0200, Martin Liška escreveu:

Quoted 2 lines

Assign input_name, received from program arguments, to file data structure.

Doesn't apply:

pat[acme@zoo linux]$ patch -p1 < /wb/1.patch
patching file tools/perf/builtin-annotate.c
Hunk #1 FAILED at 289.
Hunk #2 FAILED at 346.
2 out of 2 hunks FAILED -- saving rejects to file
tools/perf/builtin-annotate.c.rej
[acme@zoo linux]$

Quoted 4 lines

What branch is this intended for? I.e. where have you cloned this from?

Yeah, I reproduced the problem and will try to figure this out, but please always be explicit where to apply this.

I tried first on perf/core, then on perf/urgent, and it didn't apply in both cases :-(

- Arnaldo

#3 lore raw
Quoted 17 lines · Arnaldo Carvalho de Melo

Em Fri, May 29, 2015 at 09:42:41AM -0300, Arnaldo Carvalho de Melo escreveu:

Quoted 16 lines

Em Fri, May 29, 2015 at 02:06:44PM +0200, Martin Liška escreveu:

Quoted 2 lines

Assign input_name, received from program arguments, to file data structure.

Doesn't apply:

pat[acme@zoo linux]$ patch -p1 < /wb/1.patch
patching file tools/perf/builtin-annotate.c
Hunk #1 FAILED at 289.
Hunk #2 FAILED at 346.
2 out of 2 hunks FAILED -- saving rejects to file
tools/perf/builtin-annotate.c.rej
[acme@zoo linux]$

What branch is this intended for? I.e. where have you cloned this from?

Quoted 8 lines
Quoted 2 lines

Yeah, I reproduced the problem and will try to figure this out, but please always be explicit where to apply this.

I tried first on perf/core, then on perf/urgent, and it didn't apply in both cases :-(

- Arnaldo

Hello.

I've just pulled perf, patch is a diff against perf/perf/core.

$ git log --oneline | head -n2
95b12b3 perf annotate: fix -i option, which is currently ignored.
f1942b9 Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core

Thanks,
Martin

#4 lore raw

Em Fri, May 29, 2015 at 02:47:39PM +0200, Martin Liška escreveu:

Quoted 27 lines · Arnaldo Carvalho de Melo
Quoted 17 lines

Em Fri, May 29, 2015 at 09:42:41AM -0300, Arnaldo Carvalho de Melo escreveu:

Quoted 16 lines

Em Fri, May 29, 2015 at 02:06:44PM +0200, Martin Liška escreveu:

Quoted 2 lines

Assign input_name, received from program arguments, to file data structure.

Doesn't apply:

pat[acme@zoo linux]$ patch -p1 < /wb/1.patch
patching file tools/perf/builtin-annotate.c
Hunk #1 FAILED at 289.
Hunk #2 FAILED at 346.
2 out of 2 hunks FAILED -- saving rejects to file
tools/perf/builtin-annotate.c.rej
[acme@zoo linux]$

What branch is this intended for? I.e. where have you cloned this from?

Quoted 8 lines
Quoted 2 lines

Yeah, I reproduced the problem and will try to figure this out, but please always be explicit where to apply this.

I tried first on perf/core, then on perf/urgent, and it didn't apply in both cases :-(

- Arnaldo

Quoted 7 lines

Hello.

I've just pulled perf, patch is a diff against perf/perf/core.

$ git log --oneline | head -n2
95b12b3 perf annotate: fix -i option, which is currently ignored.
f1942b9 Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core

Rechecking...

#5 lore raw
In reply to Martin Liška

Em Fri, May 29, 2015 at 02:47:39PM +0200, Martin Liška escreveu:

Quoted 5 lines · Arnaldo Carvalho de Melo
Quoted 3 lines

Em Fri, May 29, 2015 at 09:42:41AM -0300, Arnaldo Carvalho de Melo escreveu:

Quoted 2 lines

Yeah, I reproduced the problem and will try to figure this out, but please always be explicit where to apply this.

Quoted 8 lines
Quoted 2 lines

I tried first on perf/core, then on perf/urgent, and it didn't apply in both cases :-(

I've just pulled perf, patch is a diff against perf/perf/core.

$ git log --oneline | head -n2
95b12b3 perf annotate: fix -i option, which is currently ignored.
f1942b9 Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core

[acme@zoo linux]$ git remote update tip
Fetching tip
[acme@zoo linux]$ git pull tip perf/core

Quoted 1 line

From git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip

* branch perf/core -> FETCH_HEAD
Already up-to-date.
[acme@zoo linux]$ git log --oneline | head -n2
f1942b96b4b4 Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core 09a216ea5c52 perf: Remove myself from MAINTAINERS entry
[acme@zoo linux]$ grep '^\(Subject\|Message-ID\)' /wb/1.patch
Message-ID: <[email protected]>
Subject: [PATCH] perf annotate: fix -i option, which is currently ignored.
[acme@zoo linux]$

[acme@zoo linux]$ git am /wb/1.patch
Applying: perf annotate: fix -i option, which is currently ignored.
error: patch failed: tools/perf/builtin-annotate.c:289
error: tools/perf/builtin-annotate.c: patch does not apply
Patch failed at 0001 perf annotate: fix -i option, which is currently
ignored.
The copy of the patch that failed is found in:
/home/acme/git/linux/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
[acme@zoo linux]$
[acme@zoo linux]$ git reset --hard
HEAD is now at f1942b96b4b4 Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core [acme@zoo linux]$ patch -p1 < /wb/1.patch
patching file tools/perf/builtin-annotate.c
Hunk #1 FAILED at 289.
Hunk #2 FAILED at 346.
2 out of 2 hunks FAILED -- saving rejects to file
tools/perf/builtin-annotate.c.rej
[acme@zoo linux]$

I failed to find the problem, ouch, the patches looks the same, applying by hand...

- Arnaldo

#6 lore raw
Quoted 51 lines · Arnaldo Carvalho de Melo

Em Fri, May 29, 2015 at 02:47:39PM +0200, Martin Liška escreveu:

Quoted 5 lines · Arnaldo Carvalho de Melo
Quoted 3 lines

Em Fri, May 29, 2015 at 09:42:41AM -0300, Arnaldo Carvalho de Melo escreveu:

Quoted 2 lines

Yeah, I reproduced the problem and will try to figure this out, but please always be explicit where to apply this.

Quoted 8 lines
Quoted 2 lines

I tried first on perf/core, then on perf/urgent, and it didn't apply in both cases :-(

I've just pulled perf, patch is a diff against perf/perf/core.

$ git log --oneline | head -n2
95b12b3 perf annotate: fix -i option, which is currently ignored.
f1942b9 Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core

[acme@zoo linux]$ git remote update tip
Fetching tip
[acme@zoo linux]$ git pull tip perf/core
From git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
* branch perf/core -> FETCH_HEAD
Already up-to-date.
[acme@zoo linux]$ git log --oneline | head -n2
f1942b96b4b4 Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core 09a216ea5c52 perf: Remove myself from MAINTAINERS entry
[acme@zoo linux]$ grep '^\(Subject\|Message-ID\)' /wb/1.patch
Message-ID: <[email protected]>
Subject: [PATCH] perf annotate: fix -i option, which is currently ignored.
[acme@zoo linux]$

[acme@zoo linux]$ git am /wb/1.patch
Applying: perf annotate: fix -i option, which is currently ignored.
error: patch failed: tools/perf/builtin-annotate.c:289
error: tools/perf/builtin-annotate.c: patch does not apply
Patch failed at 0001 perf annotate: fix -i option, which is currently
ignored.
The copy of the patch that failed is found in:
/home/acme/git/linux/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
[acme@zoo linux]$
[acme@zoo linux]$ git reset --hard
HEAD is now at f1942b96b4b4 Merge tag 'perf-core-for-mingo' of git://git.kernel.org/pub/scm/linux/kernel/git/acme/linux into perf/core [acme@zoo linux]$ patch -p1 < /wb/1.patch
patching file tools/perf/builtin-annotate.c
Hunk #1 FAILED at 289.
Hunk #2 FAILED at 346.
2 out of 2 hunks FAILED -- saving rejects to file
tools/perf/builtin-annotate.c.rej
[acme@zoo linux]$

Quoted 5 lines

I failed to find the problem, ouch, the patches looks the same, applying by hand...

- Arnaldo

That's really strange ;)
Anyway, thanks for application.

Martin

#7 lore raw

Em Fri, May 29, 2015 at 03:09:24PM +0200, Martin Liška escreveu:

Quoted 5 lines
Quoted 2 lines

I failed to find the problem, ouch, the patches looks the same, applying by hand...

That's really strange ;)
Anyway, thanks for application.

I ended up wasting^Winvesting some more time on that, it seems it was all thansk to Thunderbird ;-\

- Arnaldo

#8 lore raw
Quoted 4 lines · Arnaldo Carvalho de Melo

Em Fri, May 29, 2015 at 03:09:24PM +0200, Martin Liška escreveu:

Quoted 2 lines
Quoted 2 lines

I failed to find the problem, ouch, the patches looks the same, applying by hand...

Quoted 8 lines
Quoted 2 lines

That's really strange ;)
Anyway, thanks for application.

I ended up wasting^Winvesting some more time on that, it seems it was all thansk to Thunderbird ;-\

- Arnaldo

Ok, thank you.
I'm going to double check my preferences. Are there any recommended settings in case of sending kernel patches?

Thanks,
Martin

#9 lore raw

Em Fri, May 29, 2015 at 04:01:38PM +0200, Martin Liška escreveu:

Quoted 8 lines · Arnaldo Carvalho de Melo
Quoted 6 lines

Em Fri, May 29, 2015 at 03:09:24PM +0200, Martin Liška escreveu:

Quoted 5 lines
Quoted 2 lines

I failed to find the problem, ouch, the patches looks the same, applying by hand...

That's really strange ;)
Anyway, thanks for application.

Quoted 6 lines
Quoted 2 lines

I ended up wasting^Winvesting some more time on that, it seems it was all thansk to Thunderbird ;-\

Ok, thank you.
I'm going to double check my preferences. Are there any recommended settings in case of sending kernel patches?

I think there are recommendation somewhere, perhaps in Documentation/?

Lemme check...

[acme@zoo linux]$ find Documentation/ -type f | xargs grep -i thunderbird Documentation/email-clients.txt:Thunderbird (GUI) Documentation/email-clients.txt:Thunderbird is an Outlook clone that likes to mangle text, but there are ways Documentation/email-clients.txt: The easiest thing to do with Thunderbird and patches is to use an Documentation/email-clients.txt:- Edit your Thunderbird config settings so that it won't use format=flowed. Documentation/email-clients.txt: thunderbird's registry editor. Documentation/zh_CN/email-clients.txt:Thunderbird (GUI) Documentation/zh_CN/email-clients.txt:默认情况下,thunderbird很容易损坏文本,但是还有一些方法可以强制它变得更好。 Documentation/zh_CN/email-clients.txt:- 编辑你的Thunderbird配置设置来使它不要拆行使用:user_pref("mailnews.wraplength", 0); Documentation/zh_CN/email-clients.txt:- 编辑你的Thunderbird配置设置,使它不要使用"format=flowed"格式:user_pref("mailnews. Documentation/zh_CN/email-clients.txt:- 你需要使Thunderbird变为预先格式方式: Documentation/zh_CN/email-clients.txt: 针对Thunderbird打补丁最简单的方法就是使用一个"external editor"扩展,然后使用你最喜欢的 [acme@zoo linux]$

Heya! Even in chinese:

"Thunderbird (GUI)

Thunderbird is an Outlook clone that likes to mangle text, but there are ways to coerce it into behaving."

So, go read that and coerce it! :-P

- Arnaldo

#10 lore raw
In reply to Arnaldo Carvalho de Melo

Em Fri, May 29, 2015 at 10:08:06AM -0300, Arnaldo Carvalho de Melo escreveu:

Quoted 10 lines

[acme@zoo linux]$ patch -p1 < /wb/1.patch
patching file tools/perf/builtin-annotate.c
Hunk #1 FAILED at 289.
Hunk #2 FAILED at 346.
2 out of 2 hunks FAILED -- saving rejects to file
tools/perf/builtin-annotate.c.rej
[acme@zoo linux]$

I failed to find the problem, ouch, the patches looks the same, applying by hand...

Somehow your patch came with extra leading spaces, saw using 'set list' on vim:

(quoted diff) +0 -0

b/tools/perf/builtin-annotate.c$
index c434e12..4e08c2d 100644$

tools/perf/builtin-annotate.c$ +0 -0
@@ -289,7 +289,6 @@ int cmd_annotate(int argc, const char **argv, const

char *prefix __maybe_unused)$
^I^I},$
^I};$
^Istruct perf_data_file file = {$
-^I^I.path = input_name,$
^I^I.mode = PERF_DATA_MODE_READ,$
^I};$
^Iconst struct option options[] = {$
@@ -346,6 +345,8 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)$
^Ielse if (annotate.use_gtk)$
^I^Iuse_browser = 2;$
$
+^Ifile.path = input_name;$
+$
^Isetup_browser(true);$
$
^Iannotate.session = perf_session__new(&file, false, &annotate.tool);$
-- $
2.1.4$

and then, if I remove those, it applies, please check your thunderbird environment:

User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.6.0

- Arnaldo

#11 lore raw

[tip:perf/core] perf annotate: Fix -i option, which is currently ignored.

In reply to Martin Liška
perf annotate: Fix -i option, which is currently ignored.
Commit-ID:  44848cdbbd1bacbac2a825920b699adc000d51c7
Gitweb:     http://git.kernel.org/tip/44848cdbbd1bacbac2a825920b699adc000d51c7
Author:     Martin Liška <[email protected]>
AuthorDate: Fri, 29 May 2015 14:06:44 +0200
Committer:  Arnaldo Carvalho de Melo <[email protected]>
CommitDate: Fri, 29 May 2015 12:43:34 -0300

perf annotate: Fix -i option, which is currently ignored.

Assign input_name, received from program arguments, to file data structure.

---
 tools/perf/builtin-annotate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
tools/perf/builtin-annotate.c +2 -1
index c434e12..4e08c2d 100644
@@ -289,7 +289,6 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
 		},
 	};
 	struct perf_data_file file = {
-		.path  = input_name,
 		.mode  = PERF_DATA_MODE_READ,
 	};
 	const struct option options[] = {
@@ -346,6 +345,8 @@ int cmd_annotate(int argc, const char **argv, const char *prefix __maybe_unused)
 	else if (annotate.use_gtk)
 		use_browser = 2;
 
+	file.path  = input_name;
+
 	setup_browser(true);
 
 	annotate.session = perf_session__new(&file, false, &annotate.tool);