3 # ------------------------------------------------
4 # Copyright 2014 AT&T Intellectual Property
5 # Licensed under the Apache License, Version 2.0 (the "License");
6 # you may not use this file except in compliance with the License.
7 # You may obtain a copy of the License at
9 # http://www.apache.org/licenses/LICENSE-2.0
11 # Unless required by applicable law or agreed to in writing, software
12 # distributed under the License is distributed on an "AS IS" BASIS,
13 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 # See the License for the specific language governing permissions and
15 # limitations under the License.
16 # -------------------------------------------
19 $infl = "/var/log/gstrace";
25 open I,$infl or die "Can't open input log file $infl\n";
30 if($line =~ /rts:\[.*\]: Started Logging/){
34 if($line =~ /hfta_(\d+):\[(\d+)\]: Started Logging/){
36 $hfta_pids{$name} = $2;
38 if($line =~ /rts:\[(\d+)\]: Init LFTAs for (\w+)/){
40 $rts_pids{$name} = $1;
44 #foreach $k (keys(%rts_pids)){
45 # print "$k, ",$rts_pids{$k},"\n";
47 #foreach $k (keys(%hfta_pids)){
48 # print "$k, ",$hfta_pids{$k},"\n";
51 open C,"pinning_info.csv" or die "Can't open pinning_info.csv\n";
55 @flds = split /,/,$line;
56 if(exists($rts_pids{$flds[0]})){
57 $pinning_cmd = "taskset -pc $flds[1] ". $rts_pids{$flds[0]};
59 if(exists($hfta_pids{$flds[0]})){
60 $pinning_cmd = "taskset -pc $flds[1] ". $hfta_pids{$flds[0]};
62 print "Executing $pinning_cmd\n";