JavaScript is required to for searching.
Skip Navigation Links
Exit Print View
Solaris Dynamic Tracing Guide
search filter icon
search icon

Document Information

Preface

1.  Introduction

2.  Types, Operators, and Expressions

3.  Variables

4.  D Program Structure

5.  Pointers and Arrays

6.  Strings

7.  Structs and Unions

8.  Type and Constant Definitions

9.  Aggregations

10.  Actions and Subroutines

11.  Buffers and Buffering

12.  Output Formatting

13.  Speculative Tracing

14.  dtrace(1M) Utility

15.  Scripting

16.  Options and Tunables

17.  dtrace Provider

18.  lockstat Provider

19.  profile Provider

20.  fbt Provider

21.  syscall Provider

22.  sdt Provider

23.  sysinfo Provider

Probes

Arguments

Example

Stability

24.  vminfo Provider

25.  proc Provider

26.  sched Provider

27.  io Provider

28.  mib Provider

29.  fpuinfo Provider

30.  pid Provider

31.  plockstat Provider

32.  fasttrap Provider

33.  User Process Tracing

34.  Statically Defined Tracing for User Applications

35.  Security

36.  Anonymous Tracing

37.  Postmortem Tracing

38.  Performance Considerations

39.  Stability

40.  Translators

41.  Versioning

Glossary

Index

Arguments

The arguments to sysinfo probes are as follows:

arg0
The value by which the statistic is to be incremented. For most probes, this argument is always 1, but for some probes this argument may take other values.
arg1
A pointer to the current value of the statistic to be incremented. This value is a 64–bit quantity that will be incremented by the value in arg0. Dereferencing this pointer enables consumers to determine the current count of the statistic corresponding to the probe.
arg2
A pointer to the cpu_t structure that corresponds to the CPU on which the statistic is to be incremented. This structure is defined in <sys/cpuvar.h>, but it is part of the kernel implementation and should be considered Private.

The value of arg0 is 1 for most sysinfo probes. However, the readch and writech probes set arg0 to the number of bytes read or written, respectively. This features permits you to determine the size of reads by executable name, as shown in the following example:

# dtrace -n readch'{@[execname] = quantize(arg0)}'
dtrace: description 'readch' matched 4 probes
^C
  xclock                                            
           value  ------------- Distribution ------------- count    
              16 |                                         0        
              32 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 1        
              64 |                                         0        

  acroread                                          
           value  ------------- Distribution ------------- count    
              16 |                                         0        
              32 |@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@ 3        
              64 |                                         0        

  FvwmAuto                                          
           value  ------------- Distribution ------------- count    
               2 |                                         0        
               4 |@@@@@@@@@@@@@                            13       
               8 |@@@@@@@@@@@@@@@@@@@@@                    21       
              16 |@@@@@                                    5        
              32 |                                         0        

  xterm                                             
           value  ------------- Distribution ------------- count    
              16 |                                         0        
              32 |@@@@@@@@@@@@@@@@@@@@@@@@                 19       
              64 |@@@@@@@@@                                7        
             128 |@@@@@@                                   5        
             256 |                                         0        

  fvwm2                                             
           value  ------------- Distribution ------------- count    
              -1 |                                         0        
               0 |@@@@@@@@@                                186      
               1 |                                         0        
               2 |                                         0        
               4 |@@                                       51       
               8 |                                         17       
              16 |                                         0        
              32 |@@@@@@@@@@@@@@@@@@@@@@@@@@               503      
              64 |                                         9        
             128 |                                         0        

  Xsun                                              
           value  ------------- Distribution ------------- count    
              -1 |                                         0        
               0 |@@@@@@@@@@@                              269      
               1 |                                         0        
               2 |                                         0        
               4 |                                         2        
               8 |@                                        31       
              16 |@@@@@                                    128      
              32 |@@@@@@@                                  171      
              64 |@                                        33       
             128 |@@@                                      85       
             256 |@                                        24       
             512 |                                         8        
            1024 |                                         21       
            2048 |@                                        26       
            4096 |                                         21       
            8192 |@@@@                                     94       
           16384 |                                         0

The sysinfo provider sets arg2 to be a pointer to a cpu_t, a structure internal to the kernel implementation. The sysinfo probes fire on the CPU on which the statistic is being incremented. Use the cpu_id member of the cpu_t structure to determine the CPU of interest.