Skip to contentSkip to conversation

TRACE_BRANCH_PROFILING breaks gcc warnings

DISCUSSION Johannes Berg 4 participants 5 messages Apr 14, 2009 – Apr 15, 2009

lore
Share & tools
lore
#0 lore raw

With TRACE_BRANCH_PROFILING enabled you get "dummy may be used uninitialised" with code like the following (and gcc 4.3.3):

void *dummy, *c;

if (a && (dummy = b()))

	c = dummy;

Therefore, allyesconfig has become useless for looking at warnings.

:(

johannes

#1 lore raw
Quoted 11 lines · Johannes Berg

With TRACE_BRANCH_PROFILING enabled you get "dummy may be used uninitialised" with code like the following (and gcc 4.3.3):

void *dummy, *c;

if (a && (dummy = b()))

	c = dummy;

Therefore, allyesconfig has become useless for looking at warnings.

:(

This has been mentioned before, and I've asked about sending a patch that would prevent TRACE_BRANCH_PROFILING from being selected with an allyesconfig.

It is easy to do. I could make it a selection and not a boolean and it will not select it as default, even for allyes/modconfig

Thoughts?

-- Steve

#2 lore raw
Quoted 11 lines · Steven Rostedt
Quoted 9 lines · Johannes Berg

With TRACE_BRANCH_PROFILING enabled you get "dummy may be used uninitialised" with code like the following (and gcc 4.3.3):

void *dummy, *c;

if (a && (dummy = b()))

	c = dummy;

Therefore, allyesconfig has become useless for looking at warnings.

There's an easy solution for that problem btw: you just have to disable the branch tracer after allyesconfig. [ Or fix the compiler. Or both ;-) ]

I'm also curious, how often do you do allyesconfig builds? I've never seen you report one before. Have you started doing them recently? How much time does it take on your system?

Quoted 10 lines
Quoted 1 line

:(

This has been mentioned before, and I've asked about sending a patch that would prevent TRACE_BRANCH_PROFILING from being selected with an allyesconfig.

It is easy to do. I could make it a selection and not a boolean and it will not select it as default, even for allyes/modconfig

Thoughts?

That's a good idea - please send a patch.

Ingo

#3 lore raw
Quoted 7 lines
Quoted 7 lines

This has been mentioned before, and I've asked about sending a patch that would prevent TRACE_BRANCH_PROFILING from being selected with an allyesconfig.

It is easy to do. I could make it a selection and not a boolean and it will not select it as default, even for allyes/modconfig

We should have a symbol that is only set for allyesconfig builds.

Then we could do something like:

config TRACE_BRANCH_PROFILING
depends on !ALLYESCONFIG

The advantage is that it is obvious why we have defiend it like this rather than some inverse symbols.

I looked at generating such symbol in kconfig long time ago but never finished it.

Sam

#4 lore raw
Quoted 12 lines · Sam Ravnborg
Quoted 7 lines
Quoted 7 lines

This has been mentioned before, and I've asked about sending a patch that would prevent TRACE_BRANCH_PROFILING from being selected with an allyesconfig.

It is easy to do. I could make it a selection and not a boolean and it will not select it as default, even for allyes/modconfig

We should have a symbol that is only set for allyesconfig builds.

Then we could do something like:

Quoted 8 lines

config TRACE_BRANCH_PROFILING
depends on !ALLYESCONFIG

The advantage is that it is obvious why we have defiend it like this rather than some inverse symbols.

I looked at generating such symbol in kconfig long time ago but never finished it.

ah, nice idea! Should be fairly simple to do, right?

The other option is to disable/remove the branch profiler altogether.

Ingo