version 1.1, 2014/03/20 15:11:24
|
version 1.2, 2014/11/08 19:41:03
|
|
|
| |
## Create the keywordRegex from list of possible strings | ## Create the keywordRegex from list of possible strings |
## Comma separated list of keywords which will be marked on output | ## Comma separated list of keywords which will be marked on output |
keywords = "error,IMETHODCALL,TestServerProfileProvider,Request: queue id:,Response has error,Enumeration Set Error msg,After putCache insert,TestServerProfileProvider:" |
keywords = "XmlIO,error,IMETHODCALL,TestServerProfileProvider,Request: queue id:," |
|
keywords = keywords "Response has error,Enumeration Set Error msg,After putCache insert," |
|
keywords = keywords "TestServerProfileProvider:,putcache,getcache," |
|
keywords = keywords "setupFuture,_issueImmediateOpenOr,_issueOpenOr" |
|
keywords = keywords "IMETHODRESPONSE,SetupFutureResponse," |
|
keywords = keywords "ContextId=," |
|
keywords = keywords "setProcessingState," |
|
keywords = keywords "setProcessingState," |
|
keywords = keywords "StopTimer," |
|
keywords = keywords "StartTimer" |
if (keywords == "") | if (keywords == "") |
{ | { |
##keywords = "error,IMETHODCALL,TestServerProfileProvider" | ##keywords = "error,IMETHODCALL,TestServerProfileProvider" |
|
|
{ | { |
print "Excluding the following components from output", excludeComponentFilter | print "Excluding the following components from output", excludeComponentFilter |
} | } |
print "Begin Done" |
|
} | } |
| |
############################################################################ | ############################################################################ |
|
|
| |
## define the output file name and initialize it empty | ## define the output file name and initialize it empty |
outputFileName = fileName outputFileSuffix | outputFileName = fileName outputFileSuffix |
print "" >outputFileName |
|
print "output fileName= ", outputFileName | print "output fileName= ", outputFileName |
} | } |
| |
|
|
#### DEBUG for xml displayprint "FOUND NEXT XML Line", "indent=" indent, " isComplete " isCompleteElement, $0 | #### DEBUG for xml displayprint "FOUND NEXT XML Line", "indent=" indent, " isComplete " isCompleteElement, $0 |
## if this is not complete element (i.e start and end on single line | ## if this is not complete element (i.e start and end on single line |
## include </elementName> as possible terminator on same line | ## include </elementName> as possible terminator on same line |
### isue with element that terminates on same line. needs to indent and |
### issue with element that terminates on same line. needs to indent and |
### then outdent after print. | ### then outdent after print. |
## <IMETHODCALL NAME="References"> | ## <IMETHODCALL NAME="References"> |
## <LOCALNAMESPACEPATH> | ## <LOCALNAMESPACEPATH> |
|
|
elementName = substr($1,2) | elementName = substr($1,2) |
terminator = "</" elementName ">$" | terminator = "</" elementName ">$" |
## if this line is an entity close element | ## if this line is an entity close element |
|
## TODO why the second char is /. seems to match </A/> |
if ($0 ~ "^</[A-Z]/>$") | if ($0 ~ "^</[A-Z]/>$") |
{ | { |
type = 1 | type = 1 |
|
|
## <NAMESPACE NAME="PG_InterOp"/> This is NOT a 5. It is a 2 | ## <NAMESPACE NAME="PG_InterOp"/> This is NOT a 5. It is a 2 |
## 11 2 <NAMESPACE NAME="root"/> | ## 11 2 <NAMESPACE NAME="root"/> |
## 11 5 <NAMESPACE NAME="PG_InterOp"/> This should be type 2 | ## 11 5 <NAMESPACE NAME="PG_InterOp"/> This should be type 2 |
else if ($0 ~ "^<[A-Z]+a-z=\" ]*/>$") |
else if ($0 ~ "^<[A-Z]+[a-z=\" ]*/>$") |
{ | { |
type = 2 | type = 2 |
if (!isCompleteElement) | if (!isCompleteElement) |
|
|
} | } |
} | } |
| |
## create the indent string, (4 char indent per level) |
## create the indent string, (2 char indent per level) |
indentStr = "" | indentStr = "" |
for (x = 0; x < indent; x++) | for (x = 0; x < indent; x++) |
{ | { |
|
|
## get the ProcessName, threadName, etc. from trace entry 3 | ## get the ProcessName, threadName, etc. from trace entry 3 |
## Use the two expressions because the second one required for a very | ## Use the two expressions because the second one required for a very |
## few trace entries (ex. header files include complete path) but makes | ## few trace entries (ex. header files include complete path) but makes |
## the execution extremly long. |
## the execution extremly long so we try to match on first. |
if (($3 ~ /^\[[0-9]{2,5}:[0-9]{5,15}:[A-Za-z0-9_.]{1,40}:[0-9]{1,6}\]/ ) || | if (($3 ~ /^\[[0-9]{2,5}:[0-9]{5,15}:[A-Za-z0-9_.]{1,40}:[0-9]{1,6}\]/ ) || |
($3 ~ /^\[[0-9]{2,5}:[0-9]{5,15}:[[:print:]]{1,120}:[0-9]{1,6}\]/ )) | ($3 ~ /^\[[0-9]{2,5}:[0-9]{5,15}:[[:print:]]{1,120}:[0-9]{1,6}\]/ )) |
{ | { |
|
|
} | } |
else | else |
{ | { |
print "No Match for Process:Thread:Source:LineNum field " $3 |
print "No Match for field Process:Thread:Source:LineNum field " $3 |
|
print "line " $0 |
} | } |
} | } |
| |
|
|
| |
print "ERROR: Never found trace component to start display" >> namesFile | print "ERROR: Never found trace component to start display" >> namesFile |
} | } |
|
|
print "Input " NR " lines from file " fileName "." >> namesFile | print "Input " NR " lines from file " fileName "." >> namesFile |
print "Original time for first record was " startTime |
## The function not defined getStart = strftime("%b %d %Y-%T", startTime) |
|
## apparentlynot defined because of posix compatibility flag. |
|
print "Original time for first record was " startTime " (" getStartTime ")" |
print markCount " lines marked" >> namesFile | print markCount " lines marked" >> namesFile |
print "marks are: " keywordRegex >>namesFile | print "marks are: " keywordRegex >>namesFile |
print "Output " outputLineCount " lines to " outputFileName >> namesFile | print "Output " outputLineCount " lines to " outputFileName >> namesFile |
|
|
print "Thread IDs for ", arrayLength(threadNameArray) " threads" >> namesFile | print "Thread IDs for ", arrayLength(threadNameArray) " threads" >> namesFile |
for (item in threadNameArray) | for (item in threadNameArray) |
{ | { |
print item, threadNameArray[item] >> namesFile | print item, threadNameArray[item] >> namesFile |
} | } |
print "" >> namesFile | print "" >> namesFile |
|
|
print "Process IDs for " arrayLength(processNameArray) " processes" >> namesFile | print "Process IDs for " arrayLength(processNameArray) " processes" >> namesFile |
for (item in processNameArray) | for (item in processNameArray) |
{ | { |
|
|
{ | { |
print item " "(functionArray[item] / 2) " " >> namesFile | print item " "(functionArray[item] / 2) " " >> namesFile |
} | } |
|
## show this on console as last thing because it is handy for next |
|
## step which is usually edit of the file. |
|
print "output fileName= ", outputFileName |
} | } |
| |
| |