[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAEjAshpR2RX7sztFsmP7Sbxjv1wVDpepKCNo9G33aa6JBsafUw@mail.gmail.com>
Date: Thu, 8 Jun 2017 08:47:30 +0900
From: SeongJae Park <sj38.park@...il.com>
To: Arnaldo Carvalho de Melo <arnaldo.melo@...il.com>
Cc: peterz@...radead.org, mingo@...hat.com,
alexander.shishkin@...ux.intel.com,
"linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 4/5] perf-script-python.txt: Fix wrong code snippets
On Thu, Jun 8, 2017 at 8:35 AM, Arnaldo Carvalho de Melo
<arnaldo.melo@...il.com> wrote:
> Em Tue, May 30, 2017 at 08:18:26PM +0900, SeongJae Park escreveu:
>> This commit fixes wrong code snippets for trace_begin() and trace_end()
>> function example definition.
>
> Fixed, and using:
>
> git log --follow tools/perf/Documentation/perf-script-python.txt
>
> Added the Fixes: tag:
>
> Fixes: cff68e582237 ("perf/scripts: Add perf-trace-python Documentation")
>
> And since you're taking the time to add the Fixes tag (yay, great!)
> please also add Cc: entries for the patch author and committer, in that
> case:
Ok, I will do that from next time.
>
> Cc: Tom Zanussi <tzanussi@...il.com>
> Cc: Frederic Weisbecker <fweisbec@...il.com>
>
> I did it this time, using a script I have:
>
> [acme@...et linux]$ cat ~/bin/fixes
> #!/bin/bash
>
> cset=$1
> if [ $# -eq 0 ] ; then
> read cset
> fi
> git show --pretty=fuller $cset | grep '^\(Author\|Commit\): ' | sed -r 's/.*: +/Cc: /g'
> echo Fixes: `git one $cset`
> [acme@...et linux]$
>
> Just get the cset, in vim, and select it, pressing Shift+V while the
> cursor is on top of the cset id and then press : and finally !fixes +
> ENTER :)
>
> cff68e582237
So sweet script! :D
Thanks,
SeongJae Park
>
> - Arnaldo
>
>> Signed-off-by: SeongJae Park <sj38.park@...il.com>
>> ---
>> tools/perf/Documentation/perf-script-python.txt | 4 ++--
>> 1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/tools/perf/Documentation/perf-script-python.txt b/tools/perf/Documentation/perf-script-python.txt
>> index 44e51351536f..f723ce41268c 100644
>> --- a/tools/perf/Documentation/perf-script-python.txt
>> +++ b/tools/perf/Documentation/perf-script-python.txt
>> @@ -530,7 +530,7 @@ can implement a set of optional functions:
>> gives scripts a chance to do setup tasks:
>>
>> ----
>> -def trace_begin:
>> +def trace_begin():
>> pass
>> ----
>>
>> @@ -539,7 +539,7 @@ def trace_begin:
>> as display results:
>>
>> ----
>> -def trace_end:
>> +def trace_end():
>> pass
>> ----
>>
>> --
>> 2.13.0
Powered by blists - more mailing lists