init.tksimos.sample
3.34 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
#
# 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 seconds
set varUpdatePeriod 5
# Update modes breakdown every 5 seconds
set modesUpdatePeriod 5
# List of hosts to appear in the host selection menu
set hostlist { sim sparcplug1 }
# Default hostname and port for SimOS connection
set hostname sim
set visualPort 5105
# Number of ticks in the variable charts and modes breakdown stripchart
set chartEntries 50
# Function called by TkSimOS immediately after it connects to SimOS
proc connectHook {} {
}
# Function called by TkSimOS upon opening the variable table
proc 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 variables
varDefine 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]
} }
}