Commande splat

Objectif

Outil d'analyse des performances simple (splat). Fournit des rapports sur l'utilisation des verrous du noyau et de pthread .

Syntaxe

splat -i fichier [ -n fichier ] [ -o fichier ] [ -d [ bfta ] ] [ -l adresse ] [ -c classe] [ -s [ acelmsS ] ] [ -C UC ] [ -S nombre ] [ -t démarrage] [ -T arrêt] [ -p ]

splat -h [rubrique]

splat -j

Descriptif

splat (Simple Performance Lock Analysis Tool) est un outil logiciel qui post-traite les fichiers de trace AIX pour produire des rapports sur l'utilisation des verrous simples et complexes du noyau. Il génère également des verrous en lecture-écriture pthread et des rapports d'utilisation de variables de condition.

Indicateurs

Article Descriptif
-i fichier_entrée Fichier de trace AIX (REQUIRED).
-n fichier_nom Fichier contenant la sortie de la commande gensyms .
-o fichier_sortie Fichier dans lequel écrire les rapports (VALEUR PAR DEFAUT: stdout).
-d détail Le détail peut être l'un des suivants: [b] asic: summary and lock detail (DEFAULT) [f] onction: basic + function detail [t] hread: basic + thread detail [a] ll: basic + function + thread detail
-c classe Si l'utilisateur fournit un index de classe de verrouillage décimal, splat ne signale que l'activité des verrous de cette classe.
-l adresse Si l'utilisateur fournit une adresse de verrouillage hexadécimale, splat signale uniquement l'activité du verrou à cette adresse. splat filtre un fichier de trace pour les points d'ancrage de verrouillage contenant cette adresse de verrouillage et génère un rapport uniquement pour ce verrou.
-s critères Triez les rapports sur les verrous, les fonctions et les unités d'exécution en fonction des critères suivants:
a
acquisitions
c
pourcentage de temps d'attente du processeur
e
pourcentage de temps d'attente écoulé
l
adresse de verrouillage, adresse de fonction ou ID d'unité d'exécution
m
taux d'échec
s
nombre de tours
S
pourcentage de temps d'attente de rotation du processeur (VALEUR PAR DEFAUT)
w
pourcentage de temps d'attente réel
W
profondeur moyenne de la file d'attente
-C UC Indiquez le nombre de processeurs présents pour cette trace.
-S nombre Nombre maximal d'entrées dans chaque rapport (DEFAULT: 10).
-t heure_début Décalage horaire en secondes à partir du début de la trace.
-T heure d'arrêt Décalage en secondes à partir du début de la trace pour arrêter l'analyse des données de trace. (PAR DEFAUT: fin de la trace.)
-h [rubrique] Aide sur l'utilisation ou une rubrique spécifique. Les rubriques valides sont les suivantes:
  • tous
  • présentation
  • entrée
  • noms
  • de sécurité
  • tri
-j Imprimer la liste des points d'ancrage de trace utilisés par splat.
-P Indique l'utilisation du registre PURR pour calculer les temps de processeur.

Aide

Voici une liste des rubriques d'aide disponibles et un bref résumé de chacune d'entre elles:

Article Descriptif
Présentation Ce texte.
ENTREE AIX points d'ancrage de trace requis pour obtenir une sortie utile à partir de splat.
names Les utilitaires de nom peuvent être utilisés pour que splat mappe des adresses à des symboles lisibles par l'utilisateur.
Rapports Description de chaque rapport que la division peut générer et formules utilisées pour calculer les valeurs rapportées.
tri Liste de toutes les options de tri disponibles et comment elles sont appliquées à la sortie de splat.

Trace de fractionnement

Splat prend comme entrée principale un fichier de trace AIX qui a été collecté à l'aide de la commande de trace AIX . Avant d'analyser une trace avec splat, vous devez vous assurer que la trace est collectée avec un ensemble adéquat de points d'ancrage, notamment:
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
La capture de ces événements de trace de verrouillage et de déverrouillage peut entraîner une grave dégradation des performances en raison de la fréquence à laquelle les verrous sont utilisés dans un environnement multiprocesseur. Par conséquent, la génération de rapports sur les événements de trace de verrouillage est normalement désactivée. Pour activer la génération de rapports sur les événements de trace de verrouillage, vous devez effectuer les étapes suivantes avant de pouvoir collecter une trace incluant les événements de trace de verrouillage requis par splat (syntaxeKornShell ):
  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
Les étapes 1 à 3 sont facultatives. Ils activent l'affichage des noms de classe de verrouillage du noyau à la place des adresses. Pour plus d'informations sur bosboot et ses indicateurs, voir bosboot (1) . Les étapes 5 à 7 sont nécessaires pour activer l'instrumentation de verrouillage pthread de l'utilisateur ; le sous-répertoire temp.lib peut être placé n'importe où. Les étapes 1 à 7 sont nécessaires pour que le rapport soit complet.

Noms de splat

Splat peut utiliser la sortie de gensyms comme entrée facultative et l'utiliser pour mapper des adresses de verrouillage et de fonction à des symboles lisibles par l'utilisateur.

Les classes de verrouillage et les décalages peuvent être utilisés pour identifier un verrou de manière générale, mais pas aussi spécifique que le symbole réel.

Rapports Splat

Le rapport généré par splat se compose d'un récapitulatif de rapport, d'une section de rapport de récapitulatif de verrouillage et d'une liste de rapports de détails de verrouillage, dont chacun peut être associé à un rapport de détails de fonction et / ou de détails d'unité d'exécution.
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.

Par défaut, le rapport récapitulatif sur les verrouillages contient une liste de dix verrouillages, triés par ordre décroissant en fonction du pourcentage de temps de verrouillage (la dixième zone). La longueur du rapport récapitulatif peut être ajustée à l'aide du commutateur -S . L'ordre de tri du rapport de synthèse (et de tous les autres rapports) peut être défini à l'aide du commutateur -s dont les options sont décrites dans la section d'aide SORTING, splat -h sorting.
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)

Cette section du rapport détaillé sur les verrouillages contient les vidages des données brutes que splat collecte pour chaque verrouillage, heures exprimées en millisecondes. Les cinq états: LOCK, SPIN, WAIT, UNDISP (atched) et PREEMPT sont les cinq états de base de la machine à états finis simple_lock activée de splat. Le nombre pour chaque état correspond au nombre de fois où les actions d'une unité d'exécution ont donné lieu à une transition vers cet état. Les durées en millisecondes indiquent les durées minimale, maximale, moyenne et totale passées par une demande de verrouillage dans cet état.
   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)
Cette section du rapport détaillé sur les verrouillages contient les vidages des données brutes que splat collecte pour chaque verrouillage, heures exprimées en millisecondes. Les six états: LOCK, SPIN, LOCK avec KRLOCK, KRLOCK LOCK LOCK, KRLOCK SPIN et TRANSFORM sont les six états de base de la machine à états finis simple_lock désactivée de splat. Le nombre pour chaque état correspond au nombre de fois où les actions d'une unité d'exécution ont donné lieu à une transition vers cet état. Les durées en millisecondes indiquent les durées minimale, maximale, moyenne et totale passées par une demande de verrouillage dans cet état.
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).

Tri de la division

splat permet à l'utilisateur de spécifier les critères utilisés pour trier les rapports récapitulatifs et les rapports détaillés sur les verrous à l'aide de l'option -s . Le critère de tri par défaut consiste à trier par pourcentage de temps d'attente de rotation, c'est-à-dire le rapport entre le temps que les unités d'exécution ont passé à tourner pour un verrou et la durée combinée de la trace. A l'aide de -s, les critères de tri peuvent être modifiés comme suit:
Article Descriptif
a Acquisitions ; nombre de fois où une unité d'exécution a réussi à obtenir un verrou.
c Pourcentage de temps d'attente du processeur ; rapport entre le temps d'attente du processeur et la durée de la trace combinée.
e Pourcentage de temps d'attente écoulé ; rapport entre le temps d'attente écoulé et la durée de la trace combinée.
l l'emplacement ; l'adresse du verrou ou de la fonction, ou l'ID d'une unité d'exécution.
m Taux d'échecs ; taux de tentatives de verrouillage manquées avec le nombre d'acquisitions.
s Nombre de rotations: nombre de tentatives de verrouillage ayant échoué qui entraînent la mise en attente du verrou par une unité d'exécution.
S Pourcentage de temps d'attente de rotation du processeur (par défaut).
w Pourcentage de temps d'attente écoulé ; pourcentage du temps total pendant lequel un nombre d'unités d'exécution différent de zéro a attendu le verrouillage.
w Profondeur waitq moyenne ; nombre moyen d'unités d'exécution en attente de verrouillage, équivalent au temps moyen passé par chaque unité d'exécution en attente dans cet état.

splat utilise les critères spécifiés pour trier les rapports de verrouillage par ordre décroissant.

Restrictions

D'autres types de verrous, tels que VMM, XMAP et certains verrous spécifiques à Java, ne sont pas analysés.

Fichiers

Article Descriptif
/etc/bin/splat Outil simple d'analyse des verrous de performance (splat). Fournit des rapports sur l'utilisation des verrous de noyau et de pthread.