stack trace analyzer supports Solaris format
authorVictor Kirhenshtein <victor@netxms.org>
Fri, 22 Apr 2016 11:32:04 +0000 (14:32 +0300)
committerVictor Kirhenshtein <victor@netxms.org>
Fri, 22 Apr 2016 11:32:04 +0000 (14:32 +0300)
tools/analyze_threads.pl

index 9010170..db7d13c 100755 (executable)
@@ -1,6 +1,14 @@
 #!/usr/bin/perl
 
-@skipnames = ("Queue::getOrBlock", "ConditionWait", "poll", "select", "accept");
+@skipnames = (
+       "Queue::getOrBlock",
+       "__1cFQdDueueKgetOrBlock6MI_pv_",
+       "ConditionWait",
+       "__1cNConditionWait6FpnSnetxms_condition_t_I_b_",
+       "poll",
+       "select",
+       "accept"
+);
 
 my %skiplist;
 @skiplist{@skipnames} = ();
@@ -13,7 +21,7 @@ while(<STDIN>)
    chomp;
    $line = $_;
 
-   if ($line =~ /^(Thread .*)/)
+   if (($line =~ /^Thread .*/) || ($line =~ /^-----------------  lwp# [0-9]+.*/))
    {
       if ($ignore == 0)
       {
@@ -35,6 +43,10 @@ while(<STDIN>)
    {
       $func = $1;
    }
+   elsif ($line =~ /^ [0-9a-f]+ ([^ ]+)\s.*/)
+   {
+      $func = $1;
+   }
    $data[$index++] = $line;
    if (exists $skiplist{$func})
    {