From: thantry Date: Thu, 24 Apr 2003 23:40:20 +0000 (+0000) Subject: Adding the capability for sectional views into visualize. X-Git-Tag: v1_7_110~2^11~140 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=c97218c7fbabfc55e739389f2872c3aa2576fd75;p=fs%2Flustre-release.git Adding the capability for sectional views into visualize. This adds the switches --s and --e to enable looking at events of interests in really large logs. Applies for both analysis and visualization --- diff --git a/lustre/utils/llparser.pm b/lustre/utils/llparser.pm index 763f7fe..800dbe5 100644 --- a/lustre/utils/llparser.pm +++ b/lustre/utils/llparser.pm @@ -609,15 +609,17 @@ sub parse_file my $nodlm = shift; my $noclass = shift; my $nonet = shift; + my $sline = shift; + my $eline = shift; my $htmfile = shift; - $backref = 0; - $treeparent = 0; - $numchildren = 0; - $youngestchild = 0; - $next = 0; - $pidhead = 0; - $marked = 0; + my $backref = 0; + my $treeparent = 0; + my $numchildren = 0; + my $youngestchild = 0; + my $next = 0; + my $pidhead = 0; + my $marked = 0; my $numfiles = 0; foreach $file (@$input_files) { my $linecnt = 0; @@ -628,15 +630,16 @@ sub parse_file # Initialize the starting time to be zero open(FILEHANDLE, $file) or die "Can't open file: $file\n"; # Insert beginning of file marker, an all zero pattern - $fileline = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; - $new_file = join('_', split(/[\/, \.]/, $file)); + my $fileline = [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0]; + my $new_file = join('_', split(/[\/, \.]/, $file)); $fileline->[$e_fmtstr] = $new_file; - $start = times(); + my $start = times(); push @{$array_parsed->[$numfiles]}, $fileline; while() { $linecnt++; - @parsed_line = get_parsed_line($file, $linecnt, $_); + my @parsed_line = get_parsed_line($file, $linecnt, $_, $sline); next if ($#parsed_line == 0); + last if ($linecnt > $eline); next if (ignore_conditions(\@parsed_line, $pid, $rpctrace, $trace, $nodlm, $noclass, $nonet)); @@ -999,6 +1002,10 @@ sub get_parsed_line() my $file = shift; my $linecnt = shift; my $in_line = shift; + my $sline = shift; + if ($linecnt < $sline) { + return 0; + } if ($in_line =~ /$REGEX/) { my $tagged_pid = "${8}:${file}"; my $display_str = "${5}:{6}";