lkml.org 
[lkml]   [2015]   [Sep]   [1]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 0/4] x86/insn: perf tools: Add a few new x86 instructions

* Adrian Hunter <adrian.hunter@intel.com> wrote:

> > Agreed, what I concern is that someone finds a bug and fixes one of them and
> > another is not fixed.
> >
> > I'll see the forked version and check if it can be merged into the kernel.
>
> Ever since Linus complained about perf tools including kernel headers, I have
> assumed we should have separate source code. That email thread was not cc'ed to
> a mailing list but here is a quote:
>
> Em Sat, Jul 04, 2015 at 08:53:46AM -0700, Linus Torvalds escreveu:
>
> > So this is more fundamental, and looks like it's just due to perf abusing the
> > kernel headers, and now that rbtree has rcu support ("rbtree: Make lockless
> > searches non-fatal"), it gets tons of headers included that really don't work
> > from user space.
> >
> > There might be other things going on, but the rbtree one seems to be a big
> > one. I think perf needs to get its own rbtree header or something, instead of
> > doing that insane "let's include random core kernel headers" thing.

Note that even plain copying and occasional back-merges isn't a bad solution: it's
better than 'messy sharing' of code.

But we can also share code in a bit more organized fashion, and any of the two
solutions I proposed solve these complications:

- if we do the diff -u check warning during perf build then the forked versions
won't stay forked for long. This is the simplest variant.

- if we librarize this functionality into tools/lib/x86/decode/ (and make sure
it's a library that can be linked into the kernel) then we are back to shared
code.

The problem wasn't to share code per se, the problem was to share code in a messy
way, without making it apparent that it's shared code: which made it easy to break
the tools/perf build via harmless looking kernel side changes.

Thanks,

Ingo


\
 
 \ /
  Last update: 2015-09-01 15:21    [W:0.040 / U:0.140 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site