/fs/ocfs2/

2.6.33-rc7&id=0e8635a8e1f2d4a9e1bfc6c3b21419a5921e674f'>scripts/bootgraph.pl
blob: 12caa822a232eeddc0fc97606fc5002a86a4daf7 (plain) (tree)






































                                                                              



           
         
             
                
                    
              
         
           
 

                      
                                                                    


                                           
                                         


                                                
                 
                                             
                                          



                                    




















                                                                     
                                                                              




                                      






                                                                  


                                              


                                                      


                  






                                                              


                                                     
                                                                                                    















                                                                                        

                                                                                           


                                                 
                     

                  
                                                                

                              


                                                 
                                                           
                                      




                                                    
                                                         
                             
                             
                                                       

                             
                                       







                                                  


                                                                                                              
                        





                                                                                                                          
                 




                            

                                        
                          
                                              
                                          
                                                                              
                              


                 
#!/usr/bin/perl

# Copyright 2008, Intel Corporation
#
# This file is part of the Linux kernel
#
# This program file is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by the
# Free Software Foundation; version 2 of the License.
#
# This program is distributed in the hope that it will be useful, but WITHOUT
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
# FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
# for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program in a file named COPYING; if not, write to the
# Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor,
# Boston, MA 02110-1301 USA
#
# Authors:
# 	Arjan van de Ven <arjan@linux.intel.com>


#
# This script turns a dmesg output into a SVG graphic that shows which
# functions take how much time. You can view SVG graphics with various
# programs, including Inkscape, The Gimp and Firefox.
#
#
# For this script to work, the kernel needs to be compiled with the
# CONFIG_PRINTK_TIME configuration option enabled, and with
# "initcall_debug" passed on the kernel command line.
#
# usage:
# 	dmesg | perl scripts/bootgraph.pl > output.svg
#

use strict;

my %start;
my %end;
my %type;
my $done = 0;
my $maxtime = 0;
my $firsttime = 100;
my $count = 0;
my %pids;
my %pidctr;

while (<>) {
	my $line = $_;