lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date:	Tue, 14 Oct 2008 14:19:15 +0100
From:	Alan Jenkins <alan-jenkins@...fmail.co.uk>
To:	Ingo Molnar <mingo@...e.hu>
CC:	Frédéric Weisbecker <fweisbec@...il.com>,
	Arjan van de Ven <arjan@...radead.org>,
	linux-kernel <linux-kernel@...r.kernel.org>
Subject: [PATCH 2/2] 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@...fmail.co.uk>

diff --git a/scripts/bootgraph.pl b/scripts/bootgraph.pl
index ea2b079..d2c61ef 100644
--- a/scripts/bootgraph.pl
+++ b/scripts/bootgraph.pl
@@ -108,9 +108,9 @@ my $threshold = ($maxtime - $firsttime) / 60.0;
 my $stylecounter = 0;
 my %rows;
 my $rowscount = 1;
+my @initcalls = sort { $start{$a} <=> $start{$b} } keys(%start);
 my $key;
-my $value;
-while (($key,$value) = each %start) {
+foreach $key (@initcalls) {
 	my $duration = $end{$key} - $start{$key};
 
 	if ($duration >= $threshold) {
@@ -121,7 +121,7 @@ while (($key,$value) = each %start) {
 			$rows{$pid} = $rowscount;
 			$rowscount = $rowscount + 1;
 		}
-		$s = ($value - $firsttime) * $mult;
+		$s = ($start{$key} - $firsttime) * $mult;
 		$s2 = $s + 6;
 		$e = ($end{$key} - $firsttime) * $mult;
 		$w = $e - $s;


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ