line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
# |
2
|
|
|
|
|
|
|
# $Id: Header.pm,v 1.9 2003/12/24 20:38:54 oratrc Exp $ |
3
|
|
|
|
|
|
|
# |
4
|
|
|
|
|
|
|
package Oracle::Trace::Header; |
5
|
|
|
|
|
|
|
|
6
|
1
|
|
|
1
|
|
22
|
use 5.008001; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
32
|
|
7
|
1
|
|
|
1
|
|
5
|
use strict; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
23
|
|
8
|
1
|
|
|
1
|
|
4
|
use warnings; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
24
|
|
9
|
1
|
|
|
1
|
|
4
|
use Data::Dumper; |
|
1
|
|
|
|
|
1
|
|
|
1
|
|
|
|
|
37
|
|
10
|
1
|
|
|
1
|
|
491
|
use Oracle::Trace::Entry; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
1497
|
|
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
our @ISA = qw(Oracle::Trace::Entry); |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $VERSION = do { my @r = (q$Revision: 1.9 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
my $DEBUG = $ENV{Oracle_Trace_DEBUG} || 0; |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Chunk |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
sub parse { |
21
|
1
|
|
|
1
|
1
|
2
|
my $self = shift; |
22
|
1
|
|
|
|
|
2
|
my $data = shift; |
23
|
1
|
50
|
|
|
|
4
|
$self->debug("incoming: ".Dumper($data)) if $DEBUG >= 3; |
24
|
1
|
|
|
|
|
1
|
my $i_line = 0; |
25
|
1
|
50
|
|
|
|
5
|
if ($data) { |
26
|
|
|
|
|
|
|
LINE: |
27
|
1
|
|
|
|
|
9
|
foreach my $line (split("\n", $data)) { |
28
|
18
|
50
|
|
|
|
35
|
$self->debug("line[".$i_line."] $line") if $DEBUG >= 2; |
29
|
18
|
|
|
|
|
12
|
$i_line++; |
30
|
18
|
100
|
|
|
|
36
|
next LINE if $line =~ /^\*\*\*\s+\d+/; |
31
|
|
|
|
|
|
|
CHUNK: |
32
|
17
|
|
|
|
|
34
|
foreach my $c (split(',', $line)) { |
33
|
17
|
100
|
|
|
|
144
|
if ($c =~ /^\s*\**\s*([^-:]+)\s*?[-:]+\s*(.+)\s*$/) { |
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
34
|
13
|
|
|
|
|
28
|
my ($k, $v) = ($1, $2); |
35
|
13
|
|
|
|
|
13
|
push @{$self->{_data}->{$k}}, $v; |
|
13
|
|
|
|
|
53
|
|
36
|
|
|
|
|
|
|
} elsif ($c =~ /^\s*(ORACLE_HOME)\s*=\s*(\S+)\s*$/i) { |
37
|
1
|
|
|
|
|
2
|
push @{$self->{_data}->{$1}}, $2; |
|
1
|
|
|
|
|
5
|
|
38
|
|
|
|
|
|
|
} elsif ($c =~ /^([:\\\/\w_]+?\w+\.trc)\s*$/i) { |
39
|
1
|
|
|
|
|
3
|
push @{$self->{_data}->{tracefile}}, $1; |
|
1
|
|
|
|
|
6
|
|
40
|
|
|
|
|
|
|
} elsif ($c =~ /^\s*(APPNAME)\s*mod=([\S]+)?\s*(.+)$/i) { |
41
|
1
|
|
|
|
|
41
|
push @{$self->{_data}->{$1}}, "$2 ($3)"; |
|
1
|
|
|
|
|
9
|
|
42
|
|
|
|
|
|
|
} else { |
43
|
1
|
|
|
|
|
8
|
push @{$self->{_data}{other}}, $c; |
|
1
|
|
|
|
|
6
|
|
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
# SESSION ID:(9.5) 2003-12-23 20:43:09.907 |
47
|
|
|
|
|
|
|
# (sid.serial#) |
48
|
|
|
|
|
|
|
} |
49
|
|
|
|
|
|
|
} |
50
|
1
|
50
|
|
|
|
5
|
$self->debug("_data: ".Dumper($self->{_data})) if $DEBUG >= 3; |
51
|
1
|
50
|
|
|
|
3
|
$self->debug("lines read: $i_line") if $DEBUG; |
52
|
1
|
|
|
|
|
5
|
return $self; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
1; |
56
|
|
|
|
|
|
|
__END__ |