From: thantry Date: Wed, 25 Dec 2002 09:05:57 +0000 (+0000) Subject: Updated the parser to parse entries containing only the X-Git-Tag: v1_7_0_51~2^13~107 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=f442d6197e4f1cd532f0f812b39efd20a1ca1f35;p=fs%2Flustre-release.git Updated the parser to parse entries containing only the specific PID, if desired. This is more space efficient. --- diff --git a/lustre/utils/llparser.pm b/lustre/utils/llparser.pm index e63d971..2fd6c83 100644 --- a/lustre/utils/llparser.pm +++ b/lustre/utils/llparser.pm @@ -90,6 +90,7 @@ sub create_links { sub parse_file { my %hasharray; + my $pid = shift; $backref = 0; $treeparent = 0; $numchildren = 0; @@ -97,9 +98,10 @@ sub parse_file { $next = 0; $pidhead = 0; - while(<>){ + LINE : while(<>){ if (/$REGEX/) { @parsed_line=($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $treeparent, $numchildren, $youngestchild, $pidhead, $next, $backref); + next LINE if ($parsed_line[$e_pid] != $pid && $pid); if (!exists($hasharray{$parsed_line[$e_pid]})) { # Push a marker for the beginning of this PID my @marker_line;