Re: [PATCH] perf/core: Fix time tracking bug with multiplexing

From: Arnaldo Carvalho de Melo
Date: Tue Mar 29 2016 - 11:43:47 EST


Em Tue, Mar 29, 2016 at 09:26:44AM +0200, Peter Zijlstra escreveu:
> On Tue, Mar 29, 2016 at 03:33:23AM +0200, Stephane Eranian wrote:
> > This patch fixes a bug introduced by:
> >
> > commit 3cbaa59069677920186dcf502632ca1df4329f80
> > Author: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
> > Date: Wed Feb 24 18:45:47 2016 +0100
> >
> > perf: Fix ctx time tracking by introducing EVENT_TIME
>
> Normal quoting style is:
>
> 3cbaa5906967 ("perf: Fix ctx time tracking by introducing EVENT_TIME")
>
> I have the following git alias to help with that:
>
> one = show -s --pretty='format:%h (\"%s\")'

Cool, for completeness sake:

$ git config --global alias.one "show -s --pretty='format:%h (\"%s\")'"
$ git one 3cbaa59069677920186dcf502632ca1df4329f80
3cbaa5906967 ("perf: Fix ctx time tracking by introducing EVENT_TIME")

Make sure you have this in place:

$ git config --global core.abbrev 12

I also have this, FWIW:

$ cat ~/bin/fixes
#!/bin/bash

if [ $# -eq 1 ] ; then
cset=$1
else
read cset
fi
git show --pretty=fuller $cset | grep '^\(Author\|Commit\): ' | sed -r 's/.*: +/Cc: /g'
echo "Fixes: " `git one $cset`
$ vim ~/bin/fixes
$ fixes 3cbaa59069677920186dcf502632ca1df4329f80
Cc: Peter Zijlstra <peterz@xxxxxxxxxxxxx>
Cc: Ingo Molnar <mingo@xxxxxxxxxx>
Fixes 3cbaa5906967 ("perf: Fix ctx time tracking by introducing EVENT_TIME")
$

So that, in vim, I can select the changeset, then do: ":'<,'>!fixes", so
that the author and commiter of the fixed cset gets on the CC list.

- Arnaldo