37 using ClotResourceUsage = Resources_Schema_Logger::ClotResourceUsage;
38 using ClotUsage = Resources_Schema_Logger::ClotUsage;
39 using ClotField = Resources_Schema_Logger::ClotField;
43 ClotResourceUsage *clotLogger =
nullptr;
44 std::vector<ClotResourceUsage *> clotUsages = std::vector<ClotResourceUsage *>(2);
45 bool collected =
false;
46 std::map<unsigned, unsigned> clotTagToChecksumUnit;
47 std::vector<std::map<unsigned, std::vector<ClotUsage *>>> usageData;
49 bool usingClots()
const;
51 std::vector<ClotUsage *> &getUsageData(gress_t gress,
unsigned tag);
53 bool preorder(
const IR::BFN::LoweredParserState *state);
54 void end_apply()
override;
56 void collectClotUsages(
const IR::BFN::LoweredParserMatch *match,
57 const IR::BFN::LoweredParserState *state, gress_t gress);
59 void collectExtractClotInfo(
const IR::BFN::LoweredExtractClot *extract,
60 const IR::BFN::LoweredParserState *state, gress_t gress);
64 ClotUsage *logExtractClotInfo(
cstring parser_state,
bool hasChecksum,
int length,
int offset,
65 unsigned tag,
const Clot *clot);
68 std::vector<ClotResourceUsage *> getLoggers();