📄 init.tksimos.sample
字号:
## 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. ## TkSimOS checks for files to source in three different places:# 1) .tksimosrc in your home directory# 2) init.tksimos in the CWD# 3) Any files specified on the TkSimOS command line# Automatically update veriables every 5 secondsset varUpdatePeriod 5# Update modes breakdown every 5 secondsset modesUpdatePeriod 5# List of hosts to appear in the host selection menuset hostlist { sim sparcplug1 }# Default hostname and port for SimOS connectionset hostname simset visualPort 5105# Number of ticks in the variable charts and modes breakdown stripchartset chartEntries 50# Function called by TkSimOS immediately after it connects to SimOSproc connectHook {} {}# Function called by TkSimOS upon opening the variable tableproc varTableHook {} { # Add some variables to the initial variable table display varDisplay CYCLES; varFormat CYCLES dec varDisplay pc; varFormat pc hex varDisplay KHz; varFormat KHz flt.1}# Define some derived variablesvarDefine time { clock clicks }varDefine KHz { expr 1024.0 * [var CYCLES periodic] * [var PARAM(CPU.Count)] / \ [var time periodic]}# The foreground and background colors of the modes breakdown may be changed#set modes_bg wheat3#set modes_fg black# Defining strip charts:# The definition contains a name for the chart, and a list of fields# for the chart. Each field definition is composed of a field name, the# expression used to compute the value of the field, and the color used # to represent the field (optional: the default is black).chartDefine Profile { { Kernel { expr 256 * [bucket kernel,cycleSample] + [bucket kernel,instrCount] - \ [bucket kernel,dStall] } green } { KernelLocalStall { expr [bucket kernel,dStall] - [bucket kernel,dL2RemoteStall] } yellow } { KernelRemoteStall { bucket kernel,dL2RemoteStall } orange } { Sync { expr 256 * [bucket sync,cycleSample] + [bucket sync,instrCount] - \ [bucket sync,dStall] } red } { SyncStall { bucket sync,dStall } purple } { User { expr 256 * [bucket ROOT,cycleSample] + [bucket ROOT,instrCount] - \ [bucket ROOT,dStall] } aquamarine } { UserLocalStall { expr [bucket ROOT,dStall] - [bucket ROOT,dL2RemoteStall] } blue } { UserRemoteStall { bucket ROOT,dL2RemoteStall } DarkSlateGray } { Idle { expr 256 * [bucket idle,cycleSample] + [bucket idle,instrCount] } white }}chartDefine StallTime { { Local { expr [bucket kernel,dStall] + [bucket sync,dStall] + \ [bucket ROOT,dStall] + [bucket idle,dStall] - \ [bucket kernel,dL2RemoteStall] - [bucket sync,dL2RemoteStall] - \ [bucket ROOT,dL2RemoteStall] - [bucket idle,dL2RemoteStall] } aquamarine } { Remote { expr [bucket kernel,dL2RemoteStall] + [bucket sync,dL2RemoteStall] + \ [bucket ROOT,dL2RemoteStall] + [bucket idle,dL2RemoteStall] } cornflowerblue }}chartDefine KHz { { KHz { expr 1024.0 * [var CYCLES periodic] * [var PARAM(CPU.Count)] / \ [expr [var time periodic] + .0000001] } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -