History log of /linux-master/scripts/bootgraph.pl
Revision Date Author Comments
# c2e30119 31-May-2019 Thomas Gleixner <tglx@linutronix.de>

treewide: Replace GPLv2 boilerplate/reference with SPDX - rule 391

Based on 1 normalized pattern(s):

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

extracted by the scancode license scanner the SPDX license identifier

GPL-2.0-only

has been chosen to replace the boilerplate/reference in 1 file(s).

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Reviewed-by: Richard Fontana <rfontana@redhat.com>
Reviewed-by: Allison Randal <allison@lohutok.net>
Reviewed-by: Kate Stewart <kstewart@linuxfoundation.org>
Cc: linux-spdx@vger.kernel.org
Link: https://lkml.kernel.org/r/20190531081038.017566012@linutronix.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>


# cb77f0d6 07-May-2017 Kamil Rytarowski <n54@gmx.com>

scripts: Switch to more portable Perl shebang

The default NetBSD package manager is pkgsrc and it installs Perl
along other third party programs under custom and configurable prefix.
The default prefix for binary prebuilt packages is /usr/pkg, and the
Perl executable lands in /usr/pkg/bin/perl.

This change switches "/usr/bin/perl" to "/usr/bin/env perl" as it's
the most portable solution that should work for almost everybody.
Perl's executable is detected automatically.

This change switches -w option passed to the executable with more
modern "use warnings;" approach. There is no functional change to the
default behavior.

While there, drop "require 5" from scripts/namespace.pl (Perl from 1994?).

Signed-off-by: Kamil Rytarowski <n54@gmx.com>
Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>


# 06ed5c2b 20-Aug-2014 Michal Marek <mmarek@suse.cz>

kbuild: Make scripts executable

The Makefiles call the respective interpreter explicitly, but this makes
it easier to use the scripts manually.

Signed-off-by: Michal Marek <mmarek@suse.cz>


# 67554faa 02-Apr-2014 Fabian Frederick <fabf@skynet.be>

scripts/bootgraph.pl: Add graphic header

Adding -header + help function like other .pl in /scripts.

Signed-off-by: Fabian Frederick <fabf@skynet.be>
Signed-off-by: Michal Marek <mmarek@suse.cz>


# c443453c 09-Jun-2011 Andrew Murray <amurray@mpcdata.com>

bootgraph.pl: relax timing information requirements

This patch removes the assumption of the bootgraph.pl script that the
timing information reported by PRINTK_TIME will contain at least one
entry with a time of less than 100 seconds.

Not all boards correctly reset the system timer and in many cases the
inital times reported by PRINTK_TIME is high. When this occurs the
bootchart.pl script fails to give any useful output.

This patch sets the $firsttime variable to the largest value expected
by PRINTK_TIME

Signed-off-by: Andrew Murray <amurray@mpc-data.co.uk>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Jiri Kosina <jkosina@suse.cz>


# 0bb98e23 15-Feb-2009 Michael Neuling <mikey@neuling.org>

bootgraph: fix for use with dot symbols

powerpc has dot symbols, so the dmesg output looks like:

<4>[ 0.327310] calling .migration_init+0x0/0x9c @ 1
<4>[ 0.327595] initcall .migration_init+0x0/0x9c returned 1 after 0 usecs

The below fixes bootgraph.pl so it handles this correctly.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


# d3f8ddea 10-Jan-2009 Arjan van de Ven <arjan@linux.intel.com>

bootgraph: make the bootgraph script show async waiting time

It is useful for diagnosing boot performance to see where async function
calls are waiting on serialization... this patch adds this
functionality to the bootgraph.pl script.

The waiting time is shown as a half transparent, gray bar through the
block that is waiting.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>


# 40c8c85a 04-Jan-2009 Arjan van de Ven <arjan@linux.intel.com>

bootchart: improve output based on Dave Jones' feedback

Dave Jones, in his blog, had some feedback about the bootchart script:
Primarily his complaint was that shorter delays weren't visualized.

The reason for that was that too small delays will have their labels
mixed up in the graph in an unreadable mess.

This patch has a fix for this; for one, it makes the output wider,
so more will fit.
The second part is that smaller delays are now shown with a
much smaller font for the label; while this isn't per se
readable at a 1:1 zoom, at least you can zoom in with most SVG
viewing applications and see what it is you are looking at.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Sam Ravnborg <sam@ravnborg.org>


# 24b0ecad 04-Jan-2009 Arjan van de Ven <arjan@linux.intel.com>

bootchart: improve output based on Dave Jones' feedback

Dave Jones, in his blog, had some feedback about the bootchart script:
Primarily his complaint was that shorter delays weren't visualized.

The reason for that was that too small delays will have their labels
mixed up in the graph in an unreadable mess.

This patch has a fix for this; for one, it makes the output wider,
so more will fit.
The second part is that smaller delays are now shown with a
much smaller font for the label; while this isn't per se
readable at a 1:1 zoom, at least you can zoom in with most SVG
viewing applications and see what it is you are looking at.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>


# d1aaf8cf 13-Nov-2008 Stephen Hemminger <shemminger@vyatta.com>

tracing/fastboot: put error message on stderr

Since this scripts output is usually redirected, put error messages
on standard error and exit with error code if no data is found.

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


# 68f96c0c 12-Nov-2008 Stephen Hemminger <shemminger@vyatta.com>

tracing/fastboot: fix perlcritic warning

Impact: cleanup

Fix the following warning from the perl syntax checking tool perlcritic.
This tool is a lint like tool that checks for perl best practices.

Loop iterator is not lexical at line 113, column 1.
See page 108 of PBP. (Severity: 5)

Signed-off-by: Stephen Hemminger <shemminger@vyatta.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


# 06d1cd26 14-Oct-2008 Alan Jenkins <alan-jenkins@tuffmail.co.uk>

tracing/fastboot: fix row order in bootgraph.pl

When bootgraph.pl parses a file, it gives one row for each initcall's
pid. But they are displayed in random (perl hash) order. Let's
sort the pids by the start time of their first initcall instead.

This helps trace module initcalls, where each has a separate pid.
bootgraph.pl will show module initcalls during the initramfs; it may
also be adapted to show subsequent module initcalls.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Frédéric Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


# 2a813f8c 14-Oct-2008 Alan Jenkins <alan-jenkins@tuffmail.co.uk>

tracing/fastboot: fix bootgraph.pl to run with "use strict"

As a perl novice, I would prefer to have the benefit of the interpreters'
wisdom. It turns out there were already some warnings, so let's fix them.

Signed-off-by: Alan Jenkins <alan-jenkins@tuffmail.co.uk>
Acked-by: Frédéric Weisbecker <fweisbec@gmail.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


# 07d18904 04-Oct-2008 Frederic Weisbecker <fweisbec@gmail.com>

tracing/fastboot: fix initcalls disposition in bootgraph.pl

When bootgraph.pl parses a file, it gives one row
for each initcall's pid. But only few of them will
be displayed => the longest.

This patch corrects it by giving only a rows for pids
which have initcalls that will be displayed.

Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


# 5c542368 19-Sep-2008 Arnaud Patard <apatard@mandriva.com>

tracing/fastboot: fix bootgraph.pl initcall name regexp

The regexp used to match the start and the end of an initcall
are matching only on [a-zA-Z\_]. This rules out initcalls with
a number in them. This patch is fixing that.

Signed-off-by: Arnaud Patard <apatard@mandriva.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


# 80a398a5 14-Sep-2008 Arjan van de Ven <arjan@linux.intel.com>

tracing/fastboot: fix issues and improve output of bootgraph.pl

David Sanders reported some issues with bootgraph.pl's display
of his sytems bootup; this commit fixes these by scaling the graph
not from 0 - end time but from the first initcall to the end time;
the minimum display size etc also now need to scale with this, as does
the axis display.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>


# ddc7a01a 04-Oct-2008 Frederic Weisbecker <fweisbec@gmail.com>

tracing/fastboot: fix initcalls disposition in bootgraph.pl

When bootgraph.pl parses a file, it gives one row
for each initcall's pid. But only few of them will
be displayed => the longest.

This patch corrects it by giving only a rows for pids
which have initcalls that will be displayed.

[ mingo@elte.hu: resolved conflicts ]
Signed-off-by: Frederic Weisbecker <fweisbec@gmail.com>
Acked-by: Arjan van de Ven <arjan@linux.intel.com>
Signed-off-by: Ingo Molnar <mingo@elte.hu>


# aa5d9151 13-Sep-2008 Arjan van de Ven <arjan@linux.intel.com>

tracing/fastboot: add a script to visualize the kernel boot process / time

When optimizing the kernel boot time, it's very valuable to visualize
what is going on at which time. In addition, with the fastboot asynchronous
initcall level, it's very valuable to see which initcall gets run where
and when.

This patch adds a script to turn a dmesg into a SVG graph (that can be
shown with tools such as InkScape, Gimp or Firefox) and a small change
to the initcall code to print the PID of the thread calling the initcall
(so that the script can work out the parallelism).

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>


# 8bd9890e 19-Sep-2008 Arnaud Patard <apatard@mandriva.com>

fastboot: Fix bootgraph.pl initcall name regexp

The regexp used to match the start and the end of an initcall
are matching only on [a-zA-Z\_]. This rules out initcalls with
a number in them. This patch is fixing that.

Signed-off-by: Arnaud Patard <apatard@mandriva.com>


# 709790a9 14-Sep-2008 Arjan van de Ven <arjan@linux.intel.com>

fastboot: fix issues and improve output of bootgraph.pl

David Sanders reported some issues with bootgraph.pl's display
of his sytems bootup; this commit fixes these by scaling the graph
not from 0 - end time but from the first initcall to the end time;
the minimum display size etc also now need to scale with this, as does
the axis display.

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>


# f9b9796a 13-Sep-2008 Arjan van de Ven <arjan@linux.intel.com>

Add a script to visualize the kernel boot process / time

When optimizing the kernel boot time, it's very valuable to visualize
what is going on at which time. In addition, with some of the initializing
going asynchronous soon, it's valuable to track/print which worker thread
is executing the initialization.

This patch adds a script to turn a dmesg into a SVG graph (that can be
shown with tools such as InkScape, Gimp or Firefox) and a small change
to the initcall code to print the PID of the thread calling the initcall
(so that the script can work out the parallelism).

Signed-off-by: Arjan van de Ven <arjan@linux.intel.com>