Intel® VTune™ Amplifier enables you to create custom analysis types and viewpoints that use hardware event-based metrics you develop. To do this, edit the Metric definition files (for example,
corei7_metrics.py) available at
<install_dir>\sdk\user_metrics\ and create an instance of the metric class and fill it in according to the template.
The following snippet defines and populates a metric with the ID
LLCMiss= metric("LLC Miss")
This line defines the name of the metric as it will appear in the grid. If a metric with that ID already exists, then it is extended with the new lines, not overwritten.
LLCMiss.formula["corei7:-corei7b"] = 200* event("MEM_LOAD_RETIRED.LLC_MISS") /query("Clockticks")
This line sets the collection formula for the metric. It is a basic value.
LLCMiss.issue_eval["corei7:-corei7b"] = ( formula() > .05) * (query("PMUHotspot") > .05)
This line sets the issue formula for the metric. It uses the values collected by your collection formula and defines when the collected data becomes an issue.
LLCMiss.description["*"] = \ """description text."""
The text of this line appears as a pop-up window while hovering over a metric name. This data is optional.
LLCMiss.issue_text["*"] = \ """issue text."""
The text of this line appears as a pop-up window while hovering over a value highlighted in pink in the grid/Summary window. This data is optional.