tools/summarise_kerneltrace.pl
author William Roberts <williamr@symbian.org>
Mon, 01 Nov 2010 13:32:58 +0000
changeset 97 82119048cda2
parent 95 aad950cacc2b
child 99 e23a8d7ea8bb
permissions -rw-r--r--
Add ktrace.oby, as an easy way to add the KPROC+KTHREAD+KDLL tracing - use buildrom -D_DEBUG -fm=featuredatabase.xml syborg_stem_rom.oby ktrace.oby which will override the standard kerneltrace
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
33
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
     1
# Copyright (c) 2010 Symbian Foundation Ltd.
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
     2
# All rights reserved.
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
     3
# This component and the accompanying materials are made available
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
     4
# under the terms of the License "Eclipse Public License v1.0"
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
     5
# which accompanies this distribution, and is available
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
     6
# at the URL "http://www.eclipse.org/legal/epl-v10.html".
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
     7
#
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
     8
# Initial Contributors:
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
     9
# Symbian Foundation - initial contribution.
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    10
#
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    11
# Contributors:
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    12
#
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    13
# Description: 
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    14
# This script filters kernel trace output to the bare essentials
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    15
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    16
use strict;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    17
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    18
my %processes;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    19
my %threadcount;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    20
my %instancecount;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    21
my %originalname;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    22
my @deathlist;
95
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    23
my %loaded_exes;
33
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    24
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    25
my $line;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    26
while ($line = <>)
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    27
	{
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    28
	# AddThread ekern.exe::NVMem-ecc10dce to ekern.exe
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    29
	# Process FLogSvr.exe Die: 0 0 Kill
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    30
	# DLibrary domainSrv.exe::domainpolicy2.dll Close m=-1
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    31
	# Thread MTMInit::Via Infrared Via Infrared   Panic MTMInit 5
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    32
	# DProcess::Rename MSexe.exe to !MsvServer
95
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    33
	# DCodeSeg::Create c809aac8 file Z:\SYS\BIN\BmpAnSrv.dll ver 000a0000 process EwSrv.exe
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    34
	# Thread sysstatemgr.exe::!CleSrv_22f5d001 Logon to process matrixmenu.exe, status at 00800a74 rdv=1
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    35
	
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    36
	if ( $line =~ /^(AddThread |Process \S+ Die: |DLibrary |Thread |DProcess::Rename |DCodeSeg::Create )/o)
33
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    37
		{
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    38
		
95
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    39
		if ($line =~ /^DCodeSeg::Create \S+ file z:\\sys\\bin\\(\S+) ver \S+ process (\S+)/io)
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    40
			{
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    41
			my $exe = $1;
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    42
			my $process = $2;
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    43
			my $truename = $originalname{$process};
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    44
			$truename = $process if (!defined $truename);
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    45
			$loaded_exes{"$exe\t$truename"} = 1;
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    46
			next;
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    47
			}
33
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    48
		if ($line =~ /^DProcess::Rename (\S+) to (\S+)/o)
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    49
			{
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    50
			my $oldname = $1;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    51
			my $process = $2;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    52
		printf "Renaming %s (%d,%d) to %s\n", $oldname, $processes{$oldname}, $threadcount{$oldname}, $process;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    53
			$processes{$process} = $processes{$oldname};
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    54
			$threadcount{$process} = $threadcount{$oldname};
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    55
			$instancecount{$process} = $instancecount{$oldname};
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    56
95
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    57
			$originalname{$process} = $originalname{$oldname};
33
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    58
			delete $processes{$oldname};
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    59
			delete $threadcount{$oldname};
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    60
			}
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    61
		if ($line =~ /^AddThread (\S+)::(\S+) to (\S+)$/o)
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    62
			{
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    63
			my $process = $1;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    64
			my $thread = $2;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    65
			
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    66
			if ($thread eq "Main" || $thread eq "Null")
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    67
				{
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    68
				# New process created
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    69
				$processes{$process} = $.;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    70
				$threadcount{$process} = 0;
95
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    71
				$originalname{$process} = $process;
33
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    72
				}
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    73
			$threadcount{$process} += 1;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    74
			if (!defined $instancecount{$process})
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    75
				{
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    76
				$instancecount{$process} = 0;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    77
				}
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    78
			$instancecount{$process} += 1;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    79
			}
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    80
		print "$.: $line";
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    81
95
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    82
	# Thread sysstatemgr.exe::!CleSrv_22f5d001 Logon to process matrixmenu.exe, status at 00800a74 rdv=1
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    83
		if ($line =~ /^Thread (.*)::.* Logon to process ([^,]+),/o)
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    84
			{
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    85
			my $parentprocess = $originalname{$1};
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    86
			my $childprocess = $2;
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    87
			$loaded_exes{"$childprocess\t$parentprocess"} = 2;
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    88
			next;
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
    89
			}
33
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    90
		if ($line =~ /^Process (\S+) Die: (.*)$/o)
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    91
			{
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    92
			my $process = $1;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    93
			my $details = $2;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    94
			my $summary = sprintf "#%d, %d threads, lifetime %d-%d",
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    95
				$instancecount{$process},$threadcount{$process},$processes{$process},$.;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    96
			
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    97
			print "\t$process: $summary\n";
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    98
			delete $processes{$process};
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
    99
			delete $threadcount{$process};
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   100
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   101
			chomp $line;	
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   102
			push @deathlist, sprintf "%7d\t%-20s %s, died %s", $., $process, $summary, $details;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   103
			}
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   104
		next;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   105
		}
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   106
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   107
	# Initiating transition to state 0000.ffff.
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   108
	# R:\sf\os\devicesrv\sysstatemgmt\systemstatemgr\cmd\src\ssmcommandbase.cpp 135: Completing command with errorcode 0
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   109
	# ***** Execute cmd no. 11 without a delay
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   110
	# Starting : Z:\sys\bin\splashscreen.exe with arguments :  and Execution behaviour : 1
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   111
	if ( $line =~ /^(Initiating transition |\*\*\*\*\* |Starting : )/o)
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   112
		{
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   113
		print "SSM: $line";
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   114
		next;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   115
		}
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   116
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   117
	if ($line =~ /^(MODE_USR:)/o)
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   118
		{
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   119
		# it's crashed
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   120
		print $line, <>;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   121
		last;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   122
		}
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   123
	}
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   124
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   125
printf "\n\nActive processes (%d):\n", scalar keys %processes;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   126
foreach my $process (sort keys %processes)
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   127
	{
95
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
   128
	printf "%-30s\t%d threads, created at line %d\n", $process, $threadcount{$process}, $processes{$process};
33
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   129
	}
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   130
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   131
printf "\n\nDead processes (%d)\n", scalar @deathlist;
900525f287f9 Use UDEB system starter in debug_stem_rom.oby, and add tools\summarise_kerneltrace.pl to filter out most of the kerneltracing detail
William Roberts <williamr@symbian.org>
parents:
diff changeset
   132
print join("\n", sort @deathlist, "");
95
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
   133
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
   134
printf "\n\nLoaded executables (%d)\n", scalar keys %loaded_exes;
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
   135
foreach my $exepair (sort keys %loaded_exes)
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
   136
	{
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
   137
	my ($exe,$parent) = split /\t/, $exepair;
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
   138
	printf "%-30s\t%s\n", $exe, $parent;
aad950cacc2b Update utility for processing kerneltrace output, and add "analysis" directory containing a boot trace and the summary
William Roberts <williamr@symbian.org>
parents: 33
diff changeset
   139
	}