will almost certainly produce bad results in worker threads.
G2 graphical event viewer
-==========================
+-------------------------
The G2 graphical event viewer can display serialized vppinfra event logs
directly, or via the c2cpel tool. G2 is a fine-grained event-log viewer. It's
and also supports the CPEL file format, as described in this section.
Building G2
------------
+~~~~~~~~~~~
This link describes :ref:`how to build G2 <building-g2>`
Setting the Display Preferences
-------------------------------------------------
+~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
The file $<*HOMEDIR*>/.g2 contains display preferences, which can be overridden.
Simply un-comment one of the stanzas shown below, or experiment as desired.
*/
Screen Taxonomy
-----------------------------
+~~~~~~~~~~~~~~~
Here is an annotated G2 viewer screenshot, corresponding to activity during BGP
prefix download. This data was captured on a Cisco IOS-XR system:
Using these tools -- and some patience -- you can understand a given event log.
Mouse Gestures
--------------------------
+~~~~~~~~~~~~~~~
G2 has three fairly sophisticated mouse gesture interfaces, which are worth describing
in detail. First, a left mouse click on a display event pops up a per-event detail box.
A click on any of the figures will show them at full resolution, right-click will open figures in new tabs,
Time Ruler
-------------------
+~~~~~~~~~~
To use a time ruler, press and hold the right mouse button; drag right or left
until the ruler measures the region of interest. If the time axis scale is coarse,
:scale: 75%
Event Selection
--------------------------
+~~~~~~~~~~~~~~~
Changing the Event Selector setup controls the set of points displayed in an
obvious way. Here, we suppress all events except "this thread is now running on the CPU":
above, the "THREAD/THREADY pid:491720 tid:12" detail box appears in this fashion.
Snapshot Ring
------------------------
+~~~~~~~~~~~~~
Three buttons in lower left-hand corner of the g2 main window control the snapshot
ring. Snapshots are simply saved views: maneuver the viewer into an "interesting"
to save/restore the snapshot ring from CPEL and vppinfra event log files.
Chasing Events
-------------------------
+~~~~~~~~~~~~~~
Event chasing sorts the trace axis by occurrence of the last selected event. For
example, if one selects an event which means "thread running on the CPU" the first
:scale: 75%
Burying Boring Tracks
------------------------------------
+~~~~~~~~~~~~~~~~~~~~~
The sequence <ctrl><left-mouse-click> moves the track under the mouse to the end
of the set of tracks, effectively burying it. The sequence <shift><left-mouse-click>
stack to provide precise thread exhumation.
Summary Mode
--------------------------
+~~~~~~~~~~~~
Summary mode declutters the screen by rendering events as short vertical line
segments instead of numbered boxes. Event detail display is unaffected. G2 starts
to enable boxed numeric event display.
Hotkeys
--------------
+~~~~~~~
G2 supports the following hotkey actions, supposedly (circa 1996) Quake-like
according to the feature's original author: