OpenSolaris
Collectives
Discussions
Documentation
Download
Source Browser
Free CD
Log-in
|
en
Project dtrace-chime
:
Adding New Displays
>
New Display Wizard
>
Adding Drilldown
Top Menu
Show
:
Comments
Attachments
History
Information
Print
:
Print
Print preview
Export as PDF
Export as RTF
Export as HTML
Export as XAR
Wiki code for
Adding Drilldown
Hide Line numbers
1: == Adding Drilldown to an Existing Chime Display 2: 3: This page continues the walk-through started in the [[New Display Wizard>>Project dtrace-chime.wizard]] page and adds drilldown to the "System Calls" display created there. The following assumes that you have gone through those steps to create the display and are now ready to add drilldown. 4: 5: Once again, it helps to have a picture in your mind of what you want to see. Look at the display just created: 6: 7:  8: 9: Let’s say you want to replace the "Executable" column with a "Function" column, so that someone could, for example, select "Xorg" and get a breakdown of Xorg system calls by function. 10: 11:  12: 13: Notice that only the "Executable" column is replaced. The "History" and "Calls Per Second" columns are unchanged. When you specify a drilldown option, Chime assumes that you will be replacing all columns associated with the aggregation key of the previous display with one or more new key columns. 14: 15: First, open the wizard by clicking the  toolbar button in the main Chime window (the first button on the left under the **File** menu): 16: 17:  18: 19: When the wizard appears, click the **Browse ...** button in the top right corner of the window after **Modify Existing Display**, then open "system_calls.xml" (the one you just created) in the file chooser that appears. This will populate the **Title** and **Output** fields automatically: 20: 21:  22: 23: Click **Next**. 24: 25: In step **2. Set DTrace Program** we can insert the substitution variables required to support drilldown. If you remember, the message in the (disabled) [[**Add Drilldown Support**>>../screens_c/wizard_drilldown_disabled.gif]] screen referred us back to this step: 26: 27: > Drilldown support requires that your DTrace program use the tuple substitution variable and one or more predicate substitution variables. If you want to add drilldown menu items, first go back to the **Set DTrace Program** step and use right-click popup menus in the **Program** tab to insert tuple and predicate placeholders. 28: 29: Using the recommended right-click popup makes this easier. Highlight the aggregation key "execname" inside the square brackets, right click on it, and select **Insert Tuple Variable** from the popup menu. 30: 31:  32: 33: This replaces "execname" with the special substitution variable {{code}}??T??{{/code}} and sets "execname" as the default value for the first element (T0) of the aggregation key. 34: 35:  36: 37: Next, click after "syscall:::entry" and press {{code}}Enter{{/code}} to insert a blank row before the open curly brace. Right click in the blank row and select **Insert Predicate Variable** from the popup menu. 38: 39:  40: 41: This inserts the special substitution variable {{code}}??P0??{{/code}} as a placeholder for the first predicate and sets the default initial value to //no predicate// (blank after {{code}}??P0{{/code}}). 42: 43:  44: 45: To specify a non-blank predicate, such as {{code}}/ pid == $pid /{{/code}}, you would add it without the enclosing forward slashes: 46: 47: > ??P0 pid == $pid 48: 49: As before, you can click the **Check Compile** button to make sure you inserted the substitution variables correctly. Note that the {{code}}??{{/code}} syntax is not understood by the DTrace compiler, so Chime performs substitution before compiling. When your program looks like the one pictured above, click **Next**. 50: 51: Steps 3 through 6 are already specified and do not need to be repeated. Skip them by clicking **Next** until you reach step **7. Add Drilldown Support**: 52: 53:  54: 55: Right click on the root of the empty decision tree labeled "Menu Items" and select **Add Menu Item** from the popup menu. 56: 57:  58: 59: This adds an {{code}}<unspecified>{{/code}} entry preceded by a red "X". Select that entry to open the **Columns** specifier in the right pane. Enter "Function" as shown above to label the new column header, then click **Next**. 60: 61:  62: 63: The "Function" column will replace the "Executable" column to display system call counts by function for one or more selected executables. This screen anticipates what we want. The "Function" column will display the first (and only) element of the new aggregation key, [probefunc], exactly what the wizard already specifies: **TupleMember** is selected, and **Tuple Index** is 0. Simply click **Next**. 64: 65:  66: 67: Here we must specify the element of the aggregation key displayed in this column. Select "probefunc" from the **Tuple Member** pulldown. Below that are optional column properties. 68: 69: Choose "right" in the **Alignment** pulldown. 70: Choose "Count" in the **Total** pulldown. 71: Enter "function" in the **Singular Total Label** field. What you type is echoed in the **Plural Total Label** field, so to finish all you need to do is press the {{code}}Tab{{/code}} key (tab into the next field) then press the ’s’ key. 72: Click **Next**. 73: 74:  75: 76: Once all the new columns are specified (in this case there is only one new column; replacing the aggregation key leaves the "History" and "Calls Per Second" columns unchanged), the wizard returns to the **Columns** table to confirm the intended columns. Click **Finish**. 77: 78: Congratulations! You have just added drilldown to your new display. To run it, select "New Displays" from the **Trace Group** pulldown in the main Chime window, then double-click "System Calls" in the **Traces** list. 79: 80:  81: 82: Your new display looks the same as before, but it has a new right-click menu item: 83: 84:  85: 86: Let’s try it out. Right-click "Xorg" and select **Xorg by Function** from the popup menu. The drilldown display replaces the Executable column with the new Function column and adds "Xorg" to the title bar. (You could also select multiple executables, and they would instead be listed in a subtitle.) 87: 88:  89: 90: Notice that the new breakdown by function lacks a drilldown item in its popup menu, because we did not specify one (although we could have). 91: 92: Next, select **Display DTrace Program** from the right-click popup menu of both displays and compare their programs side by side: 93: 94:  95: 96: You can see how the placeholders you inserted in your program earlier actually work: "execname" in square brackets is replaced with "probefunc", and the predicate / execname == "Xorg" / is inserted before the open curly brace. 97: 98:  99: 100: The predicate can grow to support multiple levels of drilldown. For example, the "System Calls" display that comes installed with Chime has multiple levels of drilldown. To see what that looks like, simply open the installed display "syscall.xml" with the wizard (this is a good way to see how almost any feature of an installed display is specified in the wizard whenever you want to do something similar). 101: 102: In the wizard step **1. Set Title and Output File**, click on the **Browse ...** button in the upper right corner after the **Modify Existing Display** field. The file chooser initially shows all displays in the "New Displays" group. To see the installed displays, just go up one level in the file system. 103: 104:  105: 106: Click the first button at the top with the up arrow on the file folder (the actual icon may differ depending on the Look & Feel you specified in the Chime **Options** menu). 107: 108:  109: 110: Select "syscall.xml" and click **Open**. Click **Next** in the wizard until you get to step **7. Add Drilldown Support**. 111: 112:  113: 114: This is an example of a more complex decision tree with multiple levels of drilldown, and you can run it by selecting "Initial Displays" from the **Trace Group** pulldown in the main Chime window and double-clicking the installed "System Calls" display in the **Traces** list. 115: 116: Try it yourself! Drilldown is a powerful feature that makes your display more dynamic, more able to answer the questions it provokes. Since your display will be more useful, you might also take the time to [[share>>Project dtrace-chime.displays]] it. Chime is designed to make sharing displays easy, and your displays are welcome on the project page.
Search
Collectives
Community Group
Academic and Research
Accessibility
Advocacy
Appliances
Approachability
Architecture Process and Tools
BrandZ
Chinese Users
Community Advisory Board
Databases
Desktop
Device Drivers
Distribution
Documentation
DTrace
Emerging Platforms
Fault Management
Games on OpenSolaris
HA Clusters
HPC Developer
Installation and Packaging
Internationalization and Localization
Laptop
Logical Domains
Modular Debugger (MDB)
Networking
NFS
Observability
OpenSolaris Governing Board (OGB)
OpenSolaris Printing
OS/Net (ON)
Performance
Power Management
PowerPC
Security
Service Management Facility (smf(5))
Software Porters
Solaris Volume Manager
Storage
Systems Administration Community Group
Testing
Tools Home
Unix File Systems (UFS)
Website Community
X Window System
Xen
ZFS
Zones
Project
ADSL Modem Enhancement
ARC Process Definition
ARM Platform Port
Automatic Data Migration
BIND Update
Bluetooth Stack & Drivers
Brocade FC HBA - Initiator
Brocade FC HBA - Target
Brussels - unified network link configuration
Caiman, Solaris Install Revisited
Celeste
Český portál
Chime Visualization Tool for DTrace
CIFS client for Solaris
CIFS Server
Clearview: Network Interface Coherence
Cluster Agent: Informix Dynamic Server
Cluster Agent: OpenSolaris Container
Cluster Agent: OpenSolaris xVM
Cluster Agent: Oracle E-Business Suite
Cluster agent: PostgreSQL
Cluster Agent: Samba
Cluster Agent: Tomcat
CMT
Coarse Data Flow Parallelism
Colorado: Open HA Cluster on OpenSolaris
Command Assistant
Common Array Manager
Companion - /opt/sfw: Free and Open Source software
COMSTAR: Common Multiprotocol SCSI Target
Content
Contest
CPU Observability
Credentials Process Groups
Crossbow: Network Virtualization and Resource Control
Crypto KMS Agent Toolkit
Cryptographic Framework
Data Migration Manager
Data Tethers
Deutsches Portal
Device Detection Tool
Device Driver Utility
Device Manager
Device Mapper
Direct Rendering Infrastructure & 3D drivers
DTrace Guide
Duckwater: Simplified name services management
Easy Tools
Emancipation
Emulex Fibre Channel Device Driver
Emulex Advanced Ethernet Device Driver
Enable/Enhance Solaris support for Intel Platform
Enhance the support of USB webcams
Enhanced SMF Profiles
Enhancements for AMD-based Platforms
Erlang DTrace Integration
Ethernet bridge module for Solaris
Evaluate Conary
Events Registry
Ext3 file system support
F/OSS Package Base
Facilitation
Fibre Channel over Ethernet
Fine Grained Access Policy (FGAP)
Fingerprint Authentication
Flexible Mandatory Access Control
Forensic Tools
Fully Open X Project
Fuse on Solaris
gcore
Generic Machine Check Architecture Improvements
Google SOC
HA-JBoss
HA-MySQL
Hadoop Live CD
Hitachi
HoneyComb Fixed Content Storage
HPC Stack
Image Packaging System
Improved Performance MIB
Indiana
Innovation Awards
Input Method
Intel Graphics
Internet Key Exchange, version 2
Interrupt Resource Management
IP Datapath Refactoring
IP over Infiniband
IPsec Tunnel Reform
iSCSI Extensions for Remote DMA (iSER)
iSNS Server
JeOS - Just enough Operating System
JKstat - a java binding for libkstat
Journaled File System (JFS)
K Desktop Environment
Kerberos
Kernel Sockets
Kernel SSL Enhancements
Key Management Framework
Korn Shell 93 integration/migration project
Labeled IPsec
LatencyTOP
Layer 2 Filtering
LDoms Manager
Lending
libMicro - portable microbenchmarks
Link Layer Discovery
Live Media: Technologies for distributions running from CD and other media
Locale Data
lofi compression and cryptography support
lx64 brand
Media Management System
Mega_sas
Mexico
MilaX minimal Live Distribution
MIPS Platform Port
Mozilla DTrace
MRSL.NONsharedDevice
Multi-lingual Glossary
Multi-pathing software (MPxIO)
Multiple disk sector size support
Multiple DOI
Muskoka: An open repository for OpenSolaris technical content
Navigator
Nemo: A Framework for High-Performance Networking
Network Auto-Magic
Network Data Management Protocol
Network MIBs
Network Storage
Network Time Protocol (NTP)
Nevada Globalization
New Design of 4over6 Mechanism Based on OpenSolaris
NFS RDMA transport update and performance analysis
NFS Server in non-Global Zones
NFS version 4.1 pNFS
NFSv4 namespace extensions
Nightingale: Port Songbird to OpenSolaris
NPort ID Virtualization (NPIV)
NUMA
Object Storage Device (OSD) support for Solaris
OHACGE Script Based Plug-in
ON/Nevada (ONNV) Project
Open Development Infrastructure
Open HA Cluster Utilities
Open Sound System
OpenGrok
OpenPegasus CIM Server
OpenRTI
OpenSolaris Busybox
OpenSolaris Desktop
OpenSolaris Hispano
OpenSolaris Security Audit
OpenSolaris support for the QEMU processor emulator: host and guest
PEF: Packet Event Framework
Performance Wrappers
Pkgfactory
Polski Portal
Portail Francophone
Portal Brasil
Portals
Power Management Usability Interfaces
Presto: Automatic Printing Configuration
Printable Many Page Solaris Manuals
Promise SuperTrak RAID HBA Driver
QLogic Converged Network Adapter GLDv3 NIC Driver
Quagga Routing Protocol Suite Integration
RAID Configuration Utility
RBridge (IETF TRILL) support
RDMA Offload Framework
Reno: Login Process Enhancements for Interop
Resource Management
s10brand
SAM/QFS
SCM Migration Project
SCSI RDMA Protocol
SDcard Drivers
Sensor Abstraction Layer
Session Initiation Protocol
SFW
Shell: bourne shell, korn shell, C shell, etc.
Sierra: Intel WiFi Chipsets Support
Simple Panels
SM-HBA Based SAS HBA Management
SMF Documentation
Solaris iSCSI Target
Solaris PowerPC Port
SourceJuicer
Sparks: name service switch/nscd enhancements
Squashfs
Star integration/migration project
Starfish
Starter Kit
Storage Power Management
Sun Security Toolkit
Sun StorageTek Availability Suite
Support for OpenFabrics User Verbs / API on OpenSolaris OS
Support gcc4/GCCfss in Solaris
Suspend/Resume
SVR4 Packaging
Systemz
Tamarack: Removable Media Enhancements in Solaris
Tesla: OpenSolaris Enhanced Power Management
Test Development
Tickless Kernel Architecture
TIPC
Trademarks
Trusted networking interface policy database for Trusted Extensions
Trusted Platform Module support
Use Case
Validated Execution Project
Virtual Console
Virtual Network Machines
Visual Panels
Visualization for HPC
Volo
VRRP: Virtual Router Redundancy Protocol Implementation
VSCAN service
Web Stack
Website
Winchester: Schema mapping and ID mapping for AD Interoperability
Wireless USB Support
Wireless Wide Area Network
X Consolidation
x86 Generic FMA Topology Enumerator
Xen Gate
Xfce: A lightweight desktop environment
ZFS Boot and Install
ZFS on disk encryption support
Zone Manager
Zone Statistics
Русский портал
البوابة العربية
भारतीय पोर्टल
中国门户
日本ポータル
한국 포탈
User Group
Adelaide
Argentina
Arizona
Atlanta
Baltimore-Washington
Bangalore
Bangkok
Bangladesh
Beijing
Bélem
Berlin
Bhimavaram
Bloomington
Campus Ambassadors
Capital Region
Cardiff
Charlotte
Chengdu
Chennai
Chihuahua
Chile
Cleveland
Colombia
Columbus
Connecticut
Cracow
Czech
Dallas/Ft. Worth
Danish
Delaware
Edinburgh
Egypt
Finland
Florida
Front Range
FuZhou
Great Lakes
Greece
Hangzhou
Hawaii
HeFei
Houston
Hyderabad
Indonesia
Irish
Israel
Italian
Jinan
Kabul
Kansas City
Latvia
London
Madurai
Manchester
Mato Grosso
Melbourne
Minas Gerais
Minnesota
Montreal
Moscow
Mumbai
Munich
NEA
Netherlands
New England
New York City
New Zealand
NIT Hamirpur
Noroeste
Oklahoma City
Osnabrück
Peru
Philadelphia
Piaski
Pittsburgh
Porto Alegre
Puget Sound
Pune
Queensland
Research Triangle Park
Romania
Russia
San Antonio
San Diego
San Francisco
São Paulo
Scottish
Serbia
Shanghai
Shenzhen
Silicon Valley
Singapore
Slovak
South African
Southern Connecticut
St. Louis
Sweden
Switzerland
Sydney
Szczecin
Taiwan
Tecum
Thames Valley
Tokyo
Toronto
Trondheim
Tulsa
Turkey
Ukraine
University of Melbourne
Vale do Paraíba
Vancouver
Venezuela
Welsh - Cymru
Wisconsin
Xi'an
Subsites
Code Reviews
Code Repositories
Package Search
Bugster
Bugzilla
Test Machines
Planet
Mailing Lists
Elections & Polls
ARC Case Logs
Source Juicer
Package Factory
User Authentication
Project dtrace-chime Pages
Articles
Change Log
Displays
Installation
Java DTrace API
jdtrace Example
JavaOne 2007 Screenshots
Adding New Displays
Command Line
New Display Wizard
XML Properties
screens_c