Thursday December 15, 2005 | Sun Sensible Innovative Performance Ideas from Nicolai Kosche |
|
DProfile - Loading Range Associations into Analyzer Not all object identifiers are expression based. For all objects that are range based or state based, you can use the triadic operator (?:) to describe these objects. The triadic operator is defined as: ( expression1 ? expression2 : expression3 ) This operator evaluates expression1, if true returns expression2, otherwize returns expression3. This is identical to the C language version. A handy tool called genexp was writen that accepts tab-separated range information in the form: start_value end_value identifier ... and converts the range into an expression that evaluates in log(N) time in Sun Studio Performance Analyzer, where N is the number of elements in the range. You can download the genexp binary or genexp source. This is very handy when you want to create object identifiers that mirror hardware objects. For example, the cfgadm command returns the physical addresses for every memory board in a Sun Fire E4900, E6900, E20000 and E25000 family Servers. # cfgadm -a -s "select=type(memory),cols=ap_id:o_state:info" Ap_Id Occupant Information SB0::memory configured base address 0x0, 16777216 KBytes total SB1::memory configured base address 0x2000000000, 16777216 KBytes total SB2::memory configured base address 0x4000000000, 16777216 KBytes total SB6::memory configured base address 0xc000000000, 16777216 KBytes total SB13::memory configured base address 0x1a000000000, 16777216 KBytes total SB14::memory configured base address 0x1c000000000, 16777216 KBytes total SB15::memory configured base address 0x1e000000000, 16777216 KBytes total SB16::memory configured base address 0x20000000000, 16777216 KBytes total SB17::memory configured base address 0x22000000000, 16777216 KBytes total, 4211360 KBytes permanent I have created a script called membrd.sh that takes this output and converts it to a tab-separated list for use in genexp. You can download the membrd.sh script here.
% membrd.sh
membrd.sh: Usage: membrd.sh -{ve}
membrd.sh:
membrd.sh: -v generate viewable file
membrd.sh: -e generate expression intermediate file
membrd.sh: Requires super-user executing these commands:
# cfgadm -a -s "select=type(memory),cols=ap_id:o_state:info" > /tmp/,.sb_info
# chmod 444 /tmp/,.sb_info
%
Adding the Memory_Board definition into Analyzer is then just a matter of running this command: % membrd.sh -e | genexp Memory_Board PADDR >> .er.rc Generating the human readable version for reference is then: % membrd.sh -v Note that these Memory_Board object identifiers will match the Processor_Board object identifiers. You can use these associations to correlate behavior in your application. For Sun Fire E4500, E4800, E4900, E6500, E6800, E6900 Servers use these expressions: mobj_define Processor CPUID&0x1ff mobj_define Core CPUID&0x3ff mobj_define Processor_Board (CPUID&0x1fc)>>2 mobj_define CoreID CPUID>>9 For the larger Sun Fire E12000, E15000, E20000, and E25000 Servers use these expressions: mobj_define Processor CPUID&0x3e3 mobj_define Core CPUID&0x3ff mobj_define Processor_Board CPUID>>5 mobj_define CoreID (CPUID&0x4)>>2 Using the triadic operator (?:) in Sun Studio Performance Analyzer, any series of ranges can be defined and then associated with object identifiers. These identifiers can then be used to make powerful correlations. [ T: NiagaraCMT ] ( Dec 15 2005, 09:31:41 AM PST ) Permalink Comments [0]
Trackback URL: http://blogs.sun.com/nk/entry/dprofile_loading_range_associations_into
Comments:
Post a Comment: |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||