public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* Tool to match kernel C file to CONFIG symbol
@ 2014-10-29 23:15 Luis R. Rodriguez
  2014-10-29 23:22 ` Luis R. Rodriguez
  0 siblings, 1 reply; 5+ messages in thread
From: Luis R. Rodriguez @ 2014-10-29 23:15 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org; +Cc: backports@vger.kernel.org, Julia Lawall

Anyone familiar with a tool to match a specific C file to a respective
CONFIG symbol on the kernel? I'd prefer if its written in C or Python.
This should be easy to write if we don't have it yet.

 Luis

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tool to match kernel C file to CONFIG symbol
  2014-10-29 23:15 Tool to match kernel C file to CONFIG symbol Luis R. Rodriguez
@ 2014-10-29 23:22 ` Luis R. Rodriguez
  2014-10-30  6:16   ` Julia Lawall
  0 siblings, 1 reply; 5+ messages in thread
From: Luis R. Rodriguez @ 2014-10-29 23:22 UTC (permalink / raw)
  To: linux-kernel@vger.kernel.org, Peter Senna Tschudin
  Cc: backports@vger.kernel.org, Julia Lawall

On Wed, Oct 29, 2014 at 4:15 PM, Luis R. Rodriguez
<mcgrof@do-not-panic.com> wrote:
> Anyone familiar with a tool to match a specific C file to a respective
> CONFIG symbol on the kernel? I'd prefer if its written in C or Python.
> This should be easy to write if we don't have it yet.

Peter, didn't you have such tool already?

 Luis

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tool to match kernel C file to CONFIG symbol
  2014-10-29 23:22 ` Luis R. Rodriguez
@ 2014-10-30  6:16   ` Julia Lawall
  2014-10-30  9:06     ` Peter Senna Tschudin
  2014-10-30 10:10     ` Andreas Ruprecht
  0 siblings, 2 replies; 5+ messages in thread
From: Julia Lawall @ 2014-10-30  6:16 UTC (permalink / raw)
  To: Luis R. Rodriguez
  Cc: linux-kernel@vger.kernel.org, Peter Senna Tschudin,
	backports@vger.kernel.org, stefan.hengelein, valentinrothberg



On Wed, 29 Oct 2014, Luis R. Rodriguez wrote:

> On Wed, Oct 29, 2014 at 4:15 PM, Luis R. Rodriguez
> <mcgrof@do-not-panic.com> wrote:
> > Anyone familiar with a tool to match a specific C file to a respective
> > CONFIG symbol on the kernel? I'd prefer if its written in C or Python.
> > This should be easy to write if we don't have it yet.
> 
> Peter, didn't you have such tool already?

I think that the Erlangen people can help you (added to CC).

I'm not sure which way you want to go: What config symbol will get my file 
compiled, or if I turn on this config symbol, what files will I get.  I 
think that Stefan's Vampyr tool can help with the first.

julia

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Tool to match kernel C file to CONFIG symbol
  2014-10-30  6:16   ` Julia Lawall
@ 2014-10-30  9:06     ` Peter Senna Tschudin
  2014-10-30 10:10     ` Andreas Ruprecht
  1 sibling, 0 replies; 5+ messages in thread
From: Peter Senna Tschudin @ 2014-10-30  9:06 UTC (permalink / raw)
  To: Julia Lawall
  Cc: Luis R. Rodriguez, linux-kernel@vger.kernel.org,
	backports@vger.kernel.org, stefan.hengelein, Valentin Rothberg

I have a dirty and ugly Perl script that return source files for a
given set of Kconfig symbols:

https://gist.github.com/petersenna/6329591

On Thu, Oct 30, 2014 at 7:16 AM, Julia Lawall <julia.lawall@lip6.fr> wrote:
>
>
> On Wed, 29 Oct 2014, Luis R. Rodriguez wrote:
>
>> On Wed, Oct 29, 2014 at 4:15 PM, Luis R. Rodriguez
>> <mcgrof@do-not-panic.com> wrote:
>> > Anyone familiar with a tool to match a specific C file to a respective
>> > CONFIG symbol on the kernel? I'd prefer if its written in C or Python.
>> > This should be easy to write if we don't have it yet.
>>
>> Peter, didn't you have such tool already?
>
> I think that the Erlangen people can help you (added to CC).
>
> I'm not sure which way you want to go: What config symbol will get my file
> compiled, or if I turn on this config symbol, what files will I get.  I
> think that Stefan's Vampyr tool can help with the first.
>
> julia



-- 
Peter

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Re: Tool to match kernel C file to CONFIG symbol
  2014-10-30  6:16   ` Julia Lawall
  2014-10-30  9:06     ` Peter Senna Tschudin
@ 2014-10-30 10:10     ` Andreas Ruprecht
  1 sibling, 0 replies; 5+ messages in thread
From: Andreas Ruprecht @ 2014-10-30 10:10 UTC (permalink / raw)
  To: Julia Lawall, Luis R. Rodriguez
  Cc: linux-kernel@vger.kernel.org, Peter Senna Tschudin,
	backports@vger.kernel.org, stefan.hengelein, valentinrothberg

Hi all,

actually the problem isn't that easy... some of the information from the
Kbuild files is not entirely straight-forward to extract.

If you're interested in the former (that is, what config symbols have to
be enabled to have a file compiled), there is a Python tool called
"golem" in the toolsuite[0] from our group which determines the
preconditions for files to be built (called with parameter "-i"). Sadly
it currently takes a few hours to finish as it probes the build system
with changing partial configurations.

I'm currently working on a faster combined parsing/probing approach and
could make an early development snapshot of the parser available to you,
please contact me directly if you want to have a look at that.

For something similar to the latter problem (which files get compiled
from a specific configuration) golem can be called with the "-c"
parameter and a source file to determine if the file is compiled with
the current configuration. You could use that to match a configuration
option to a file. Alternatively, you can use the "-l" parameter to see a
list of all files compiled with the current configuration.

Hope this helps,

Andreas

[0] https://undertaker.cs.fau.de

On 30.10.2014 07:16, Julia Lawall wrote:
> 
> 
> On Wed, 29 Oct 2014, Luis R. Rodriguez wrote:
> 
>> On Wed, Oct 29, 2014 at 4:15 PM, Luis R. Rodriguez
>> <mcgrof@do-not-panic.com> wrote:
>>> Anyone familiar with a tool to match a specific C file to a respective
>>> CONFIG symbol on the kernel? I'd prefer if its written in C or Python.
>>> This should be easy to write if we don't have it yet.
>>
>> Peter, didn't you have such tool already?
> 
> I think that the Erlangen people can help you (added to CC).
> 
> I'm not sure which way you want to go: What config symbol will get my file 
> compiled, or if I turn on this config symbol, what files will I get.  I 
> think that Stefan's Vampyr tool can help with the first.
> 
> julia
> 

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-10-30 10:17 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-29 23:15 Tool to match kernel C file to CONFIG symbol Luis R. Rodriguez
2014-10-29 23:22 ` Luis R. Rodriguez
2014-10-30  6:16   ` Julia Lawall
2014-10-30  9:06     ` Peter Senna Tschudin
2014-10-30 10:10     ` Andreas Ruprecht

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox