Using Perf-Counter Properties
The performance register access control feature enables you to get, set and unset a domain's access rights to certain groups of performance registers.
Use the ldm add-domain and ldm set-domain commands to specify a value for the perf-counters property. The new perf-counters property value will be recognized by the guest domain on the next reboot. If no perf-counters value is specified, the value is htstrand. See the ldm(8) man page.
You can specify the following values for the perf-counters property:
-
global -
Grants the domain access to the global performance counters that its allocated resources can access. Only one domain at a time can have access to the global performance counters. You can specify this value alone or with either the
strandorhtstrandvalue. -
strand -
Grants the domain access to the strand performance counters that exist on the CPUs that are allocated to the domain. You cannot specify this value and the
htstrandvalue together. -
htstrand -
Behaves the same as the
strandvalue and enables instrumentation of hyperprivilege mode events on the CPUs that are allocated to the domain. You cannot specify this value and thestrandvalue together.
To disable all access to any of the performance counters, specify perf-counters=.
If the hypervisor does not have the performance access capability, attempting to set the perf-counters property fails.
The ldm list -o domain and ldm list -e commands show the value of the perf-counters property. If the performance access capability is not supported, the perf-counters value is not shown in the output.
Example 15-11 Creating a Domain and Specifying Its Performance Register Access
Create the new ldg0 domain with access to the global register set:
primary# ldm add-domain perf-counters=global ldg0
Example 15-12 Specifying the Performance Register Access for a Domain
Specify that the ldg0 domain has access to the global and strand register sets:
primary# ldm set-domain perf-counters=global,strand ldg0
Example 15-13 Specifying that a Domain Does Not Have Access to Any Register Sets
Specify that the ldg0 domain does not have access to any of the register sets:
primary# ldm set-domain perf-counters= ldg0
Example 15-14 Viewing Performance Access Information
The following examples show how to view performance access information by using the ldm list -o domain command.
-
The following
ldm list -o domaincommand shows that theglobalandhtstrandperformance values are specified on theldg0domain:primary# ldm list -o domain ldg0 NAME STATE FLAGS UTIL NORM ldg0 active -n---- 0.0% 0.0% SOFTSTATE Solaris running UUID 062200af-2de2-e05f-b271-f6200fd3eee3 HOSTID 0x84fb315d CONTROL failure-policy=ignore extended-mapin-space=on cpu-arch=native rc-add-policy= shutdown-group=15 perf-counters=global,htstrand DEPENDENCY master= PPRIORITY 4000 VARIABLES auto-boot?=false boot-device=/virtual-devices@100/channel-devices@200/disk@0:a /virtualdevices@100/channel@200/disk@0 network-boot-arguments=dhcp,hostname=solaris, file=http://10.129.241.238:5555/cgibin/wanboot-cgi pm_boot_policy=disabled=0;ttfc=2000;ttmr=0;
-
The following
ldm list -p -o domaincommand shows the same information as in the previous example but in the parseable form:primary# ldm list -p -o domain ldg0 VERSION 1.12 DOMAIN|name=ldg0|state=active|flags=normal|util=|norm_util= UUID|uuid=4e8749b9-281b-e2b1-d0e2-ef4dc2ce5ce6 HOSTID|hostid=0x84f97452 CONTROL|failure-policy=reset|extended-mapin-space=on|cpu-arch=native|rc-add-policy=| shutdown-group=15|perf-counters=global,htstrand DEPENDENCY|master= VARIABLES |auto-boot?=false |boot-device=/virtual-devices@100/channel-devices@200/disk@0 |pm_boot_policy=disabled=0;ttfc=2500000;ttmr=0;