tools/summarise_kerneltrace.pl
author William Roberts <williamr@symbian.org>
Thu, 18 Nov 2010 15:45:28 +0000
changeset 138 6028e81d48fd
parent 99 e23a8d7ea8bb
permissions -rw-r--r--
Update stem_rom.oby and rom_content.csv to remove multimedia Also removed spurious Phonebook2_reg.rsc file which causes PhoneBook to appear in the matrix menu
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;
99
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    26
my $partline = "";
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
    27
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
    28
	{
99
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    29
	# Clean up the effect of "DTimer::Create ..." traces in the middle of lines
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    30
	if ($partline ne "")
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    31
		{
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    32
		$line = $partline . $line;
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    33
		$partline = "";
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    34
		}
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    35
	elsif ($line =~ /^(.*)(DTimer::Create.*)$/o)
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    36
		{
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    37
		$line = $2;
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    38
		$partline = $1;
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    39
		}
e23a8d7ea8bb Update filter_obyfile.pl to report the "minimal ROM" executables
William Roberts <williamr@symbian.org>
parents: 95
diff changeset
    40
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
    41
	# 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
    42
	# 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
    43
	# 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
    44
	# 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
    45
	# 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
    46
	# 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
    47
	# 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
    48
	
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
    49
	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
    50
		{
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
		
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
    52
		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
    53
			{
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
    54
			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
    55
			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
    56
			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
    57
			$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
    58
			$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
    59
			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
    60
			}
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
    61
		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
    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 $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
    64
			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
    65
		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
    66
			$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
    67
			$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
    68
			$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
    69
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
    70
			$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
    71
			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
    72
			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
    73
			}
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 ($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
    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
			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
    77
			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
    78
			
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
			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
    80
				{
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
				# 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
    82
				$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
    83
				$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
    84
				$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
    85
				}
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
    86
			$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
    87
			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
    88
				{
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
    89
				$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
    90
				}
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
			$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
    92
			}
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
		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
    94
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
    95
	# 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
    96
		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
    97
			{
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
    98
			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
    99
			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
   100
			$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
   101
			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
   102
			}
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
   103
		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
   104
			{
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
			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
   106
			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
   107
			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
   108
				$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
   109
			
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
			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
   111
			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
   112
			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
   113
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
			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
   115
			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
   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
		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
   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
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
	# 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
   121
	# 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
   122
	# ***** 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
   123
	# 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
   124
	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
   125
		{
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
		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
   127
		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
   128
		}
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
	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
   131
		{
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
		# 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
   133
		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
   134
		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
   135
		}
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
   136
	}
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
   137
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
   138
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
   139
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
   140
	{
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
   141
	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
   142
	}
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
   143
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
   144
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
   145
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
   146
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
   147
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
   148
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
   149
	{
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
   150
	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
   151
	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
   152
	}