Rawhide kernel options not enabled?

Steven Rostedt rostedt at goodmis.org
Tue Feb 3 01:11:06 UTC 2009



On Mon, 2 Feb 2009, Josh Boyer wrote:

> On Mon, Feb 02, 2009 at 05:34:27PM -0500, Steven Rostedt wrote:
> >
> >On Mon, 2 Feb 2009, Roland McGrath wrote:
> >
> >> > I thought we were going to enable these in rawhide since the e1000
> >> > EEPROM problem was fixed:
> >> > 
> >> > CONFIG_FUNCTION_TRACER  (was CONFIG_FTRACE)
> >> > CONFIG_DYNAMIC_FTRACE
> >> 
> >> Last I knew this still uses -pg and implies -fno-omit-frame-pointer.  
> >> This probably kills performance somewhat, and more importantly during a 
> >> rawhide debug-kernel phase, might change the corners of compiler behavior
> >> that we're checking vs what we'd want in a production kernel.
> >
> >The performance hit by -fno-omit-frame-pointer depends on the which 
> >hardware you are running. I've been told by Arjan that the latest x86 
> >hardware has negligible performance hit on this feature.
> >
> >But with this on, you can enable kernel function tracing at runtime. And 
> >this is a very powerful tool. This might be something to discuss, where we 
> >may sacrifice a bit of power for the ability of dynamic tracing.
> 
> So I'm a kernel dude.  Yet I have to wonder...
> 
> What good is that to a normal user?
> Why would they ever care about being able to enable function tracing?
> Are there shiny GUI tools that do it for them? 

Soon, but not yet ;-)

> Are there even release notes or wiki pages that tell them how to do it
> and why they need it?

I can write those up. Currently they just exist in 
Documentation/ftrace.txt

> If it's that cool, would we ship with it enabled in stable releases?

I would expect so.

> 
> I can see the value for doing kernel debugging.  Telling a user "do X and
> give me the output of Y" could help kernel developers, but the normal user
> just isn't going to care.

Do not put down that debugging ability just yet. Would it not be nice to 
just tell a user to run a script you send him (the script would do all 
the command line commands) and then the user could send you back the 
result. The user would not need to reboot or compile another kernel. You 
would be able to turn on or off anything function trace you would like.

Newer features coming out in 29 that are ever cooler ;-) Like the function 
graph tracer that gives you this output:

 # echo sys_open > /debug/tracing/set_graph_function
 # echo function_graph > /debug/tracing/current_tracer
 # cat /debug/tracing/trace
# tracer: function_graph
#
# CPU  DURATION                  FUNCTION CALLS
# |     |   |                     |   |   |   |
 1)               |  sys_open() {
 1)               |    do_sys_open() {
 1)               |      getname() {
 1)   3.440 us    |        kmem_cache_alloc();
 1)               |        strncpy_from_user() {
 1)               |          __strncpy_from_user() {
 1)   3.060 us    |            might_fault();
 1)   6.845 us    |          }
 1) + 10.508 us   |        }
 1) + 20.774 us   |      }
 1)               |      alloc_fd() {
 1)               |        _spin_lock() {
 1)   1.708 us    |          get_parent_ip();
 1)   6.833 us    |        }
 1)   2.032 us    |        expand_files();
 1)               |        _spin_unlock() {
 1)   2.024 us    |          get_parent_ip();
 1)   7.253 us    |        }
 1) + 24.504 us   |      }
 1)               |      do_filp_open() {
 1)               |        path_lookup_open() {
 1)               |          get_empty_filp() {
 1)   2.728 us    |            kmem_cache_alloc();
 1)   1.834 us    |            get_parent_ip();
 1)   1.914 us    |            get_parent_ip();
 1)               |            security_file_alloc() {
 1)   2.284 us    |              cap_file_alloc_security();
 1)   6.130 us    |            }
 1) + 24.922 us   |          }
 1)               |          do_path_lookup() {
 1)               |            _read_lock() {
 1)   1.776 us    |              get_parent_ip();
 1)   7.278 us    |            }
 1)   2.652 us    |            path_get();
 1)               |            _read_unlock() {
 1)   2.034 us    |              get_parent_ip();
 1)   6.407 us    |            }
 1)               |            path_walk() {
[...]


-- Steve




More information about the Fedora-kernel-list mailing list