P4C
The P4 Compiler
|
Classes | |
class | CollectNodes |
struct | CoverageOptions |
Specifies general options and which IR nodes to track with this particular visitor. More... | |
struct | SourceIdCmp |
Utility function to compare IR nodes in a set. We use their source info. More... | |
Typedefs | |
using | CoverageSet = std::set<const IR::Node *, SourceIdCmp> |
Functions | |
void | logCoverage (const CoverageSet &all, const CoverageSet &visited, const CoverageSet &new_) |
Logs nodes from new_ which have not yet been visited (are not members of visited ). | |
void | printCoverageReport (const CoverageSet &all, const CoverageSet &visited) |
Produces detailed final coverage log. | |
This file is a collection of utilities for coverage tracking in P4 programs. Currently, this class tracks statement and constant table entry coverage. The utilities here can be used by interpreters that need to walk the IR of the P4 program and track which percentage of nodes they have visited. The p4tools (backends/p4tools) framework uses this coverage visitor.
struct P4::Coverage::CoverageOptions |
Specifies general options and which IR nodes to track with this particular visitor.
using P4::Coverage::CoverageSet = std::set<const IR::Node *, SourceIdCmp> |
Set of nodes used for coverage purposes. Compares nodes based on their clone_id to take node modifications into account.