Concurrency Visualizer markers
In the Concurrency Visualizer, markers are icons that represent events in an app. Typically, the app generates these events to designate phases or occurrences in an application. The events can be generated by the app or by libraries and runtimes that the app uses.
Kinds of markers
The Concurrency Visualizer uses three kinds of markers to represent application events: flags, messages, and spans.
Use a flag to indicate an interesting point in time in your app. For example, you might use a flag to represent that a variable value has reached a certain threshold or that an exception was thrown.
A message also marks a point in time, but you can use it for log-style tracing. For example, what might have been dumped to a log file you can now wrap in a message call so that you can trace it and view it in the Concurrency Visualizer. You can also use the Concurrency Visualizer to export this data to a CSV file.
A span represents an interval of time in your app, for example, one of its phases.
Marker linkage to threads
Each thread that generates markers has a separate timeline channel. The ID of the thread that's responsible for generating the marker events is shown next to the description of the marker channel. The ID that's shown on the left side of the marker channel matches the ID of another thread in the current process.
Marker importance
Markers can have one of four importance levels: low, normal, high, and critical. You can filter the sources of markers based on importance level. For example, if you only want to see markers from a particular source that has normal or critical importance, you can configure the filter in the Advanced Settings dialog box. The importance of a marker is displayed in its tooltip, and in the Markers Report.
Marker category
A marker category indicates a group of marker events that come from the same source. The Concurrency Visualizer uses color to distinguish different categories of flags and spans. You can configure the Concurrency Visualizer to use categories to filter the marker events from a particular event provider. Use the Advanced Settings dialog box to configure the filter.
Known sources of markers
Any ETW provider can generate markers, as long as the provider adheres to certain constraints. You can configure the Concurrency Visualizer to listen to additional event sources for markers. By default, it listens to these event sources:
C++ AMP (C++ Accelerated Massive Parallelism)
You can use the Markers tab in the Advanced Settings dialog box to control whether markers from various sources are displayed in the Concurrency Visualizer and you can filter for markers based on importance and category.
Markers from EventSource
The Concurrency Visualizer can also display EventSource events. For more information, see Visualize EventSource events as markers.
Flag markers
A flag marker represents something that occurred at an instant in time in an app. A flag can represent many kinds of application events. For example, a flag could show when a particular work item was scheduled or when an exception was thrown. Runtimes such as the Task Parallel Library can also generate flags.
Flag importance
Flags are displayed in different sizes depending on their importance. Like any marker, the importance can be low, normal, high, or critical. This illustration shows the appearance of markers by importance level:
Flag category
A flag is displayed in one of five different colors depending on its category. The colors are reused if there are more than five categories. You cannot choose the color. Like any marker, the category can be any integer. The next illustration shows the colors for the first five categories.
Alerts
An alert is a red-colored flag that represents a critical application event, such as an exception. Here's an alert:
Aggregation flags
Sometimes flags occur so close to one another in the Concurrency Visualizer that they can't be drawn individually. When this occurs, a gray aggregation flag that represents the underlying flags is shown. When you rest the pointer on one of these icons, a tooltip displays the number of underlying flags that are represented. To view the flags, zoom in. If you zoom in all the way and still get an aggregation flag, you can view the underlying flags in the Markers Report.
Aggregation flags are drawn in different sizes. The size depends on the importance level of the most important flag in the aggregation. The following illustration shows aggregation flags in increasing order of importance.
Message markers
A message marker represents log output. A message is a string that's issued by a specific thread at a specific time. You can export messages to a text file for use with other tools. You can rest the pointer on a message in the Concurrency Visualizer to view the message string. And you can view all the message markers in the Markers report. The following illustration shows a message marker.
Message aggregation markers
Sometimes multiple messages occur so close to one another in the Concurrency Visualizer that they can't be drawn individually. When this occurs, a message aggregation marker that represents the underlying messages is shown. When you rest the pointer on one of these icons, a tooltip displays the number of underlying messages that are represented. To view the messages, zoom in. If you zoom in all the way and still get an aggregation marker, you can view the underlying messages in the Markers Report.
Span markers
A span marker represents a meaningful phase of an application. For example, you can use a span to represent an interval of time during which a particular work item is being processed. Its length represents the duration of the corresponding application phase. This illustration shows a span in Concurrency Visualizer:
Span category
A span marker is displayed in one of five different colors, depending on its category. The colors are repeated if there are more than five categories. The category can be any integer. This illustration shows the five possible colors:
Span aggregation markers
Sometimes span markers occur so close to one another in the Concurrency Visualizer that they can't be drawn individually. When this occurs, a gray span aggregation marker that represents the underlying spans is shown. When you rest the pointer on one of these icons, a tooltip displays the number of underlying spans that are represented. To view the spans, zoom in. If you zoom in all the way and still get an span aggregation marker, you can view the underlying span markers in the Markers Report. This illustration shows a span aggregation marker: