Befehl "splat"
Zweck
Einfaches Performance Lock Analysis Tool (splat). Stellt Nutzungsberichte für Kernel-und pthread -Sperren bereit.
Syntax
Splat -i Datei [ -n Datei ] [ -o Datei ] [ -d [ BFTA ] ] [ -l Adresse ] [ -c Klasse] [ -s [ acelmsS ] ] [ -C CPUs ] [ -S Anzahl ] [ -t. Start] [ -T Stoppen] [ -p ]
splat -h [Thema]
splat -j
Beschreibung
splat (Simple Performance Lock Analysis Tool) ist ein Software-Tool, das AIX® nachbearbeitet, um einfache und komplexe Kernel-Sperrverwendungsberichte zu erstellen. Außerdem erzeugt der Befehl auch Berichte über die Verwendung von Lese-/Schreibsperren für pthread-Mutexe und Bedingungsvariablen.
Flags
| Element | Beschreibung |
|---|---|
| -i Eingabedatei | AIX -Tracedatei (erforderlich) |
| -n Namensdatei | Datei mit der Ausgabe des Befehls gensyms |
| -o Ausgabedatei | Datei, in die Berichte geschrieben werden sollen (Standard: stdout) |
| -d Detail | Für "Detail" können die folgenden Werte angegeben werden: [b]asic: Zusammenfassung und Sperrdetails (Standard), [f]unction: basic + Funktionsdetails, [t]hread: basic + Threaddetails, [a]ll: basic + Funktions- + Threaddetails |
| -c Klasse | Wenn der Benutzer einen dezimalen Sperrklassenindex angibt, berichtet splat nur Aktivitäten für Sperren in dieser Klasse. |
| -l Adresse | Wenn der Benutzer eine hexadezimale Sperradresse angibt, berichtet splat nur die Aktivitäten für die Sperre an dieser Adresse. Der Befehl splat filtert eine Tracedatei nach Sperrenhooks, die diese Sperradresse enthalten, und erstellt einen Bericht ausschließlich für diese Sperre. |
| -s Kriterien | Sortiert die Sperren-, Funktions- und Threadberichte nach den folgenden Kriterien:
|
| -C CPUs | Gibt die Anzahl der für diesen Trace vorhandenen Prozessoren an. |
| -S Anzahl | Gibt die maximale Anzahl der Einträge in jedem Bericht an (Standard: 10). |
| -t Startzeit | Gibt die Zeitdistanz seit dem Start des Trace für die Analyse in Sekunden an. |
| -T Stoppzeit | Gibt die Zeitdistanz seit dem Start des Trace für das Ende der Tracedatenanalyse in Sekunden an. (Standard: Ende des Trace) |
| -h [Thema] | Hilfe zur Verwendung oder ein bestimmtes Thema. Die gültigen Themen sind im Folgenden aufgelistet:
|
| -j | Gibt eine Liste der von splat verwendeten Trace-Hooks aus. |
| -p | Gibt an, dass das PURR-Register zur Berechnung der Prozessorzeiten verwendet werden soll. |
Hilfe
Im Folgenden finden Sie eine Liste der verfügbaren Hilfethemen mit einer kurzen Zusammenfassung:
| Element | Beschreibung |
|---|---|
| OVERVIEW | Dieser Text. |
| INPUT | AIX Trace-Hooks, die erforderlich sind, um eine hilfreiche Ausgabe von splatzu erhalten |
| NAMES | Gibt an, welche Namen verwendet werden können, um splat anzuweisen, Adressen lesbaren Symbolen zuzuordnen. |
| REPORTS | Eine Beschreibung jedes Berichts, den splat erzeugen kann, und die Formeln, die zur Berechnung der berichteten Werte verwendet werden. |
| SORTING | Eine Liste aller verfügbaren Sortieroptionen mit der Angabe, wie sie auf die Ausgabe von splat angewendet werden. |
Splat-Trace
106 DISPATCH
10C DISPATCH IDLE PROCESS
10E RELOCK
112 LOCK
113 UNLOCK
134 HKWD_SYSC_EXECVE
139 HKWD_SYSC_FORK
419 CPU PREEMPT
465 HKWD_SYSC_CRTHREAD
46D WAIT LOCK
46E WAKEUP LOCK
606 HKWD_PTHREAD_COND
607 HKWD_PTHREAD_MUTEX
608 HKWD_PTHREAD_RWLOCK
609 HKWD_PTHREAD_GENERAL
Die Erfassung dieser Traceereignisse zum Sperren und Entsperren kann aufgrund der Häufigkeit, mit der Sperren in einer Multiprozessorumgebung verwendet werden,
zu schwerwiegenden Leistungseinbußen führen. Deshalb ist das Berichten von Traceereignissen zum Sperren normalerweise inaktiviert. Um Berichte für Traceereignisse zu aktivieren, müssen die folgenden Schritte ausgeführt werden, bevor eine Trace erfasst werden kann, der Traceereignisse zu Sperren enthält, die splat erfordert (Korn-Shell-Syntax): 1. bosboot -ad /dev/hdisk0 -L
2. shutdown -Fr
3. (reboot the machine)
4. locktrace -S
5. mkdir temp.lib; cd temp.lib
6. ln -s /usr/ccs/lib/perf/libpthreads.a
7. export LIBPATH=$PWD:$LIBPATH
Die Schritte 1 bis 3 sind optional. Sie aktivieren die Anzeige der Klassennamen für Kernelsperren anstelle von Adressen. Weitere Informationen zum Befehl bosboot und dessen Flags finden Sie in der Beschreibung von bosboot(1). Die Schritte 5 bis 7 sind notwendig, um die Instrumentierung für Sperren von Benutzer-pthreads zu aktivieren.
Das Unterverzeichnis temp.lib kann an einer beliebigen Stelle gespeichert werden. Die Schritte 1 bis 7 sind erforderlich, damit der Bericht vollständig ist.Splat-Namen
Der Befehl splat kann die Ausgabe von gensyms als optionale Eingabe akzeptieren und diese verwenden, um Sperr- und Funktionsadressen lesbaren Symbolen zuzuordnen.
Sperrklassen und Offsets können verwendet werden, um eine Sperre allgemein zu identifizieren, aber nicht so speziell wie das eigentliche Symbol.
Splat-Berichte
Report Summary
^^^^^^^^^^^^^^
The report summary consists of the following elements:
- The trace command used to collect the trace.
- The host that the trace was taken on.
- The date that the trace was taken on.
- The duration of the trace in seconds.
- The estimated number of CPUs
- The combined elapsed duration of the trace in seconds;
( the duration of the trace multiplied by the number of
CPUs identified during the trace ).
- Start time, which is the offset in seconds from the beginning of the
trace that trace statistics begin to be gathered.
- Stop time, which is the offset in seconds from the beginning of the
trace that trace statistics stop being gathered.
- Total number of acquisitions during the trace.
- Acquisitions per second, which is computed by dividing
the total number of lock acquisitions by the real-time
duration of the trace.
- % of Total Spin Time, this is the summation of all lock spin hold
times, divided by the combined trace duration in seconds, divided by 100.
The current goal is to have this value be less than 10% of the total
trace duration.
Lock Summary
^^^^^^^^^^^^
The lock summary report has the following fields:
Lock The name, lockclass or address of the lock.
Type The type of the lock, identified by one of the following letters:
Q A RunQ lock
S A simple kernel lock
D A disabled simple kernel lock
C A complex kernel lock
M A PThread mutex
V A PThread condition-variable
L A PThread read/write lock
Acquisitions The number of successful lock attempts for this lock, minus
the number of times a thread was preempted while holding
this lock.
Spins The number of unsuccessful lock attempts for this lock,
minus the number of times a thread was undispatched while
spinning.
Wait The number of unsuccessful lock attempts that
or resulted in the attempting thread going to
Transform sleep to wait for the lock to become available,
or allocating a krlock.
%Miss Spins divided by Acquisitions plus Spins, multiplied by 100.
%Total Acquisitions divided by the total number of all
lock acquisitions, multiplied by 100.
Locks/CSec Acquisitions divided by the combined elapsed
duration in seconds.
Percent HoldTime
Real CPU The percent of combined elapsed trace time that
threads held the lock in question while dispatched.
DISPATCHED_HOLDTIME_IN_SECONDS divided by combined
trace duration, multiplied by 100.
Real Elaps(ed) The percent of combined elapsed trace time that
threads held the lock while dispatched or sleeping.
UNDISPATCHED_AND_DISPATCHED_HOLDTIME_IN_SECONDS divided
by combined trace duration, multiplied by 100.
Comb Spin The percent of combined elapsed trace time that
threads spun while waiting to acquire this lock.
SPIN_HOLDTIME_IN_SECONDS divided by combined trace
duration, multiplied by 100.
Der Sperrenzusammenfassungsbericht ist standardmäßig eine Liste mit zehn Sperren, die in absteigender Reihenfolge nach Spin-Wartezeit (zehntes Feld) sortiert sind. Die Länge des Zusammenfassungsberichts kann mit dem Schalter -S angepasst werden. Die Sortierreihenfolge des Zusammenfassungsberichts (und aller anderen Berichte) kann mit dem Schalter -s festgelegt werden,
dessen Optionen im Abschnitt SORTING der vom Befehl splat -h erzeugten Ausgabe beschrieben sind.Lock Detail
^^^^^^^^^^^
The lock detail report consists of the following fields:
LOCK The address (in hexadecimal) of the lock.
NAME The symbol mapping for that address (if available)
CLASS The lockclass name (if available) and hexadecimal offset,
used to allocate this lock ( lock_alloc() kernel service ).
Parent Thread Thread id of the parent thread. This field only exists for Mutex,
Read/Write lock and Conditional Variable report.
creation time Elapsed time in seconds after the first event recorded in trace,
if available. This field only exists for Mutex, Read/Write lock
and Conditional Variable report.
deletion time Elapsed time in seconds after the first event recorded in trace,
if available. Tthis field only exists for Mutex, Read/Write lock
and Conditional Variable report.
Pid Pid number associated to the lock (this field only exists for Mutex,
Read/Write lock and Conditional Variable report).
Process Name Process name associated to the lock (this field only exists for Mutex,
Read/Write lock and Conditional Variable report).
Call-Chain Stack of called methods (if possible to have them, this field only
exists for Mutex, Read/Write lock and Conditional Variable report).
Acquisitions The number of successful lock attempts for this lock.
This field is named Passes for the conditional variable lock report.
Miss Rate The number of unsuccessful lock attempts divided by
Acquisitions plus unsuccessful lock attempts, multiplied
by 100.
Spin Count The number of unsuccessful lock attempts.
Wait Count The number of unsuccessful lock attempts that resulted in
the attempting thread going to sleep to wait for the lock
to become available.
Transform Count The number of krlock allocated and deallocated by the simple lock.
Busy Count The number of simple_lock_try() calls that returned busy.
Seconds Held
CPU The total time in seconds that this lock was held by
dispatched threads.
Elapsed The total time in seconds that this lock was held by
both dispatched and undispatched threads.
NOTE: neither of these two values should exceed the
total real elapsed duration of the trace.
Percent Held
Real CPU The percent of combined elapsed trace time that
threads held the lock in question while dispatched.
DISPATCHED_HOLDTIME_IN_SECONDS divided by trace
duration, multiplied by 100.
Real Elaps(ed) The percent of combined elapsed trace time that
threads held the lock while dispatched or sleeping.
UNDISPATCHED_AND_DISPATCHED_HOLDTIME_IN_SECONDS divided
by trace duration, multiplied by 100.
Comb Spin The percent of combined elapsed trace time that
threads spun while waiting to acquire this lock.
SPIN_HOLDTIME_IN_SECONDS divided by trace duration,
multiplied by 100.
Wait The percentage of combined elapsed trace time that
threads unsuccessfully tried to acquire this lock.
SpinQ Splat keeps track of the minimum, maximum and average
depth of the spin queue (the threads spinning, waiting
for a lock to become available).
WaitQ As with the spin queue, splat also tracks the minimum,
maximum and average depth of the queue of threads waited
waiting for a lock to become available).
PROD The associated krlocks prod calls count.
CONFER SELF The confer to self calls count for the simple lock and the
associated krlocks.
CONFER TARGET The confer to target calls count for the simple lock and the
associated krlocks. w/ preemption reports the successfull calls
count, resulting in a preemption.
CONFER ALL The confer to all calls count for the simple lock and the
associated krlocks. w/ preemption reports the successfull calls
count, resulting in a preemption.
HANDOFF The associated krlocks handoff calls count.
Lock Activity w/Interrupts Enabled (mSecs)
Dieser Abschnitt des Sperrendetailberichts enthält Speicherauszüge der Rohdaten, die splat für jede Sperre erfasst. Die Zeiten sind in Millisekunden angegeben. Die fünf Status LOCK, SPIN, WAIT, UNDISP(atched) und PREEMPT sind die fünf Basisstatus der aktivierten finiten Zustandsmaschine simple_lock des Befehls splat. Der Zähler für jeden Status gibt an, wie oft die Aktionen eines Threads zu einem Übergang in diesen Status geführt haben. Die Angaben für die Dauer (in Millisekunden) zeigen die minimale, die maximale, die durchschnittliche und die Gesamtzeit an, die eine Sperrenanforderung in dem jeweiligen Status verbracht hat. LOCK: this state represents a thread successfully acquiring a lock.
SPIN: this state represents a thread unsuccessfully trying to acquire
a lock.
WAIT: this state represents a spinning thread (in SPIN) going to sleep
(voluntarily) after exceeding the thread's spin threshold.
UNDISP: this state represents a spinning thread (in SPIN) becoming
undispatched (involuntarily) before exceeding the thread's
spin threshold.
PREEMPT: this state represents when a thread holding a lock is
undispatched.
Lock Activity w/Interrupts Disabled (mSecs)
Dieser Abschnitt des Sperrendetailberichts enthält Speicherauszüge der Rohdaten, die splat für jede Sperre erfasst. Die Zeiten sind in Millisekunden angegeben. Die sechs Status, LOCK, SPIN, LOCK with KRLOCK, KRLOCK LOCK, KRLOCK
SPIN und TRANSFORM, sind die sechs Basisstatus der inaktivierten finiten Zustandsmaschine simple_lock des Befehls splat. Der Zähler für jeden Status gibt an, wie oft die Aktionen eines Threads zu einem Übergang in diesen Status geführt haben. Die Angaben für die Dauer (in Millisekunden) zeigen die minimale, die maximale, die durchschnittliche und die Gesamtzeit an, die eine Sperrenanforderung in dem jeweiligen Status verbracht hat.LOCK: This state represents a thread successfully acquiring a lock.
SPIN: This state represents a thread unsuccessfully trying to acquire
a lock.
LOCK with The thread has successfully acquired the lock, while holding
KRLOCK: the associated krlock, and is currently executing.
KRLOCK LOCK: The thread has successfully acquired the associated krlock,
and is currently executing.
KRLOCK SPIN: The thread is executing and unsuccessfully attempting to acquire
the associated krlock.
TRANSFORM: The thread has successfully allocated a krlock it associates to,
and is executing.
Function Detail
^^^^^^^^^^^^^^^
The function detail report consists of the following fields:
Function Name The name or return address of the function which
used the lock.
Acquisitions The number of successful lock attempts for this lock.
For complex lock and read/write lock there is a
distinction between acquisition for writing
(Acquisition Write) and for reading
(Acquisition Read).
Miss Rate The number of unsuccessful lock attempts divided by
Acquisitions, multiplied by 100.
Spin Count The number of unsuccessful lock attempts.
For complex lock and read/write lock there is a
distinction between spin count for writing
(Spin Count Write) and for reading
(Spin Count Read).
Wait Count The number of unsuccessful lock attempts that resulted in
the attempting thread going to sleep to wait for the lock
to become available.
For complex lock and read/write lock there is a
distinction between wait count for writing
(Wait Count Write) and for reading
(Wait Count Read).
Transform Count The number of times that a simple lock has allocated a krlock,
while the thread was trying to acquire the simple lock.
Busy Count The number of simple_lock_try() calls that returned busy.
Percent Held of Total Time
CPU The percent of combined elapsed trace time that
threads held the lock in question while dispatched.
DISPATCHED_HOLDTIME_IN_SECONDS divided by trace
duration, multiplied by 100.
Elaps(ed) The percent of combined elapsed trace time that
threads held the lock while dispatched or sleeping.
UNDISPATCHED_AND_DISPATCHED_HOLDTIME_IN_SECONDS divided
by trace duration, multiplied by 100.
Spin The percent of combined elapsed trace time that
threads spun while waiting to acquire this lock.
SPIN_HOLDTIME_IN_SECONDS divided by combined trace
duration, multiplied by 100.
Wait The percentage of combined elapsed trace time that
threads unsuccessfully tried to acquire this lock.
Return Address The calling function's return address in hexadecimal.
Start Address The start address of the calling function in hexadecimal.
Offset The offset from the function start address in hexadecimal.
Thread Detail
^^^^^^^^^^^^^
The thread detail report consists of the following fields:
ThreadID Thread identifier.
Acquisitions The number of successful lock attempts for this lock.
Miss Rate The number of unsuccessful lock attempts divided by
Acquisitions, multiplied by 100.
Spin Count The number of unsuccessful lock attempts.
Wait Count The number of unsuccessful lock attempts that resulted in
the attempting thread going to sleep to wait for the lock
to become available.
Transform Count The number of times that a simple lock has allocated a krlock,
while the thread was trying to acquire the simple lock.
Busy Count The number of simple_lock_try() calls that returned busy.
Percent Held of Total Time
CPU The percent of combined elapsed trace time that
threads held the lock in question while dispatched.
DISPATCHED_HOLDTIME_IN_SECONDS divided by trace
duration, multiplied by 100.
Elaps(ed) The percent of combined elapsed trace time that
threads held the lock while dispatched or sleeping.
UNDISPATCHED_AND_DISPATCHED_HOLDTIME_IN_SECONDS divided
by trace duration, multiplied by 100.
Spin The percent of combined elapsed trace time that
threads spun while waiting to acquire this lock.
SPIN_HOLDTIME_IN_SECONDS divided by combined trace
duration, multiplied by 100.
Wait The percent of combined elapsed trace time that
threads unsuccessfully tried to acquire this lock.
ProcessID Process identifier (only for SIMPLE and COMPLEX Lock report).
Process Name Name of the process (only for SIMPLE and COMPLEX Lock report).Splat-Sortierung
| Element | Beschreibung |
|---|---|
| a | Gibt an, wie oft ein Thread erfolgreich eine Sperre erhalten hat. |
| c | Die Prozessorwartezeit in Prozent, d. h. das Verhältnis von Prozessorwartezeit zur kombinierten Tracedauer. |
| e | Die abgelaufene Wartezeit in Prozent, d. h. das Verhältnis der abgelaufenen Wartezeit zur kombinierten Tracedauer. |
| l | Die Adresse der Sperre oder Funktion oder die ID eines Threads. |
| m | Fehltrefferrate, d. h. das Verhältnis fehlgeschlagener Sperrversuche zur Anzahl erhaltener Sperren. |
| s | Spin-Zähler, d. h. die Anzahl der fehlgeschlagenen Sperrversuche, die dazu geführt haben, dass ein Thread auf eine Sperre warten musste. |
| S | Die Spin-Prozessorwartezeit in Prozent (Standard). |
| w | Die abgelaufene Wartezeit in Prozent, d. h. der Anteil der Gesamtwartezeit, in dem Threads (Anzahl ungleich null) auf eine Sperre gewartet haben. |
| w | Die durchschnittliche waitq -Tiefe; die durchschnittliche Anzahl der Threads, die auf die Sperre warten, entspricht der durchschnittlichen Zeit, die jeder wartende Thread in diesem Status verbringt. |
Der Befehl splat verwendet die angegebenen Kriterien, um die Sperrenberichte in absteigender Reihenfolge zu sortieren.
Einschränkungen
Andere Sperrentypen wie VMM, XMAP und bestimmte Java-spezifische Sperren werden nicht analysiert.
Dateien
| Element | Beschreibung |
|---|---|
| /etc/bin/splat | Enthält den Befehl splat (Simple Performance Lock Analysis Tool). Stellt Berichte zur Verwendung von Kernel- und pthread-Sperren bereit. |