⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 footprint.prl

📁 一个用在mips体系结构中的操作系统
💻 PRL
字号:
#!/usr/local/bin/perl5 -w## Copyright (C) 1996-1998 by the Board of Trustees#    of Leland Stanford Junior University.# # This file is part of the SimOS distribution. # See LICENSE file for terms of the license. ### Produce a gnuplot-type output out of the footprint functionrequire "getopts.pl";&Getopts('i:n:');$junk = 0;if( defined($opt_i) ) {     $inputFile = $opt_i;} else {    $inputFile = "syscalls.stats";}if( defined($opt_n) ) {     $wload = $opt_n;} else {     $wload = 0;}open(KSTATS,$inputFile);while(<KSTATS>) {    if(/^CONFIG/) {         ($junk,$index,$val) = split(' ');        $config{$index} = $val;        #print $index,"  XXXX ",$val,"\n";    }    if( /^FPRINT_D/ ) {         @x = split(" ");        $syscall = $x[1];        $index = $x[2];        for $i (3..$#x) {             $val = hex($x[$i]);            $pos = 0;            while( $val > 0 ) {                 if( ($val%2)==1) {                     $line = 0x60000000 + (($index+$i-3)* 32 + $pos)*  $config{'ICache.LineSize'} ;                    print "$wload $syscall $line\n";                    $val = $val -1;                }                $val = int($val/2);                $pos = $pos + 1;            }        }    }}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -