From: "Björn Steinbrink" <B.Steinbrink@gmx.de>
To: Ingo Molnar <mingo@elte.hu>
Cc: Al Viro <viro@ZenIV.linux.org.uk>,
Harvey Harrison <harvey.harrison@gmail.com>,
Thomas Gleixner <tglx@linutronix.de>,
"H. Peter Anvin" <hpa@zytor.com>,
LKML <linux-kernel@vger.kernel.org>,
"Pallipadi, Venkatesh" <venkatesh.pallipadi@intel.com>
Subject: Re: [PATCH] x86: !x & y typo in mtrr code
Date: Wed, 30 Apr 2008 14:17:38 +0200 [thread overview]
Message-ID: <20080430121738.GA4559@atjola.homenet> (raw)
In-Reply-To: <20080430093233.GD23528@elte.hu>
On 2008.04.30 11:32:33 +0200, Ingo Molnar wrote:
> Automating Sparse runs so that it can become part of our daily
> patch-flow is _not_ trivial and it's not just a matter of typing make
> C=1. Thomas is working on integrating Sparse delta analysis into our
> daily patch workflow nevertheless.
Who said daily? More often can be better, but just before the pull
request is still better than nothing. And even some very basic and
stupid filtering can make the sparse output more feasible without losing
"too much" information (my stupid approach here can fail for example
when you remove an error of one class while introducing another one of
the same class).
Given the merge of x86.git that introduced this specific bug we have:
9e9abecf - "merge x86.git"
Now we can get:
$ git merge-base 9e9abecf^1 9e9abecf^2
4b119e21d0c66c22e8ca03df05d9de623d0eb50f
So you branched at 4b119e21... (your history is linear, that helps here)
To get the same information before the merge happened upstream, in your
local repo, you can do:
git merge-base for-linus origin/master
(or whatever your branches are called)
# So we get the old upstream version:
git checkout 4b119e21d0c
# setup config, whatever
make
make C=2 2>old-sparse
# Then the state of your tree right before the merge:
git checkout 9e9abecf^2
make
make C=2 2>new-sparse
# And now some stupid sorting and cleaning:
sort old-sparse | sed -e 's/^\([^:]*\):[^:]*:[^:]*:/\1:/' > old-sparsef
sort new-sparse | sed -e 's/^\([^:]*\):[^:]*:[^:]*:/\1:/' > new-sparsef
# How many old sparse warnings are gone now (approx.)?
$ diff old-sparsef new-sparsef | grep -c '^< [^ ]*:'
33
# And how many new do we have (approx.)?
$ diff old-sparsef new-sparsef | grep -c '^> [^ ]*:'
36
Depending on the order of the sed and sort commands, you get slightly
different output, due to code moving around or whatever, of course to
get that "mostly" right it takes more than the 5 minutes of thinking
that I spent on it.
In those cases in which there is more than 1 line per warning, the
output is obivously messed up here, so the actual number of real
warnings from sparse that are left is even lower than the number above
(26 for gone and new warnings in this case). And you can also only use
the filtered messages to navigate the original sparse log, because the
line numbers are stripped and the messed up ordering of multi-line
warnings, but well, shouldn't be too bad.
Slap another level of filtering on it that can ignore warnings that are
known to be bogus or in which you're simply not interested or whatever
and you're down to a pretty manageable set of warnings I guess.
Finally, yeah, I know, this approach is far from perfect, but in my
nobody-should-care-about-it opinion, it's better than nothing and it's
probably not too hard for you (or Thomas) to come up with a less stupid
filtering strategy, that's less error-prone than my hack.
Björn
next prev parent reply other threads:[~2008-04-30 12:17 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-27 4:00 [PATCH] x86: !x & y typo in mtrr code Harvey Harrison
2008-04-27 4:20 ` Al Viro
2008-04-29 21:04 ` Ingo Molnar
2008-04-30 6:46 ` Björn Steinbrink
2008-04-30 7:46 ` Thomas Gleixner
2008-04-30 9:32 ` Ingo Molnar
2008-04-30 12:17 ` Björn Steinbrink [this message]
2008-04-30 12:35 ` Ingo Molnar
2008-04-30 15:35 ` Harvey Harrison
2008-04-30 18:06 ` Ingo Molnar
2008-05-06 18:24 ` Valdis.Kletnieks
2008-04-28 11:27 ` Ingo Molnar
2008-04-28 15:10 ` Harvey Harrison
2008-04-28 23:16 ` Pallipadi, Venkatesh
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20080430121738.GA4559@atjola.homenet \
--to=b.steinbrink@gmx.de \
--cc=harvey.harrison@gmail.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=mingo@elte.hu \
--cc=tglx@linutronix.de \
--cc=venkatesh.pallipadi@intel.com \
--cc=viro@ZenIV.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox