Lines Matching +full:one +full:- +full:timer +full:- +full:only
1 #! @PATH_PERL@ -w
10 #chop($ncpu = `sysctl -n hw.ncpu`);
11 #die "Found $ncpu CPUs; can only be run on systems with 1 CPU.\n" if ($ncpu > 1);
16 chop($timer = `sysctl -n kern.timecounter.hardware 2> /dev/null`);
18 $timer =~ tr/\U/\L/;
20 if ($timer eq '') {
25 $timer = $1;
32 $opt_t = $timer if !defined($opt_t);
34 if ($timer ne '') { # $timer found...
35 if ($opt_t ne '') { # - and $opt_t found
36 if ($timer ne $opt_t) { # - - and they differ
37 warn "You specified a $opt_t timer but I detected a $timer timer.\n";
40 } else { # - - and they are the same
43 } else { # - but no $opt_t specified; this is OK
46 } else { # No $timer found...
47 if ($opt_t ne '') { # - but $opt_t was specified
48 $timer = $opt_t; # - - so use it.
49 } else { # - and neither was $opt_t
50 warn "I can't tell what timer you have. Please specify one.\n";
59 if (/^(-?\d+\.\d+)(\s\d)?$/) {
73 $freq_adj = int ( ( $freq_adj - 1 ) / 2 );
74 print "Applying freq_adj of <".-$freq_adj.">\n";
76 $sysctl = "machdep.".$timer."_freq";
78 chop($mach_freq = `sysctl -n $sysctl`);
82 $n_mach_freq = $mach_freq - $freq_adj;
85 print "$sysctl $mach_freq -> $n_mach_freq\n";
87 print "i8254: ".`sysctl -w $sysctl=$n_mach_freq`;
92 Usage: $0 [-d drift_file] [-n] [-t timer]
94 and "timer" is usually "tsc" or "i8254"
95 and "-n" says "don't really change anything, just say what would happen".