"[Expr 1200, TypeDecl 900]" — nonzero tags, descending by count.
| 90 | |
| 91 | // "[Expr 1200, TypeDecl 900]" — nonzero tags, descending by count. |
| 92 | static void gc_format_breakdown ( const TagCounts & c, TextWriter & out ) { |
| 93 | vector<pair<uint16_t,uint64_t>> v; |
| 94 | for ( uint16_t t=0; t<16; ++t ) if ( c.n[t] ) v.push_back({t, c.n[t]}); |
| 95 | sort(v.begin(), v.end(), [](const pair<uint16_t,uint64_t> & a, const pair<uint16_t,uint64_t> & b){ |
| 96 | return a.second > b.second; |
| 97 | }); |
| 98 | out << "["; |
| 99 | for ( size_t i=0; i<v.size(); ++i ) { |
| 100 | if ( i ) out << ", "; |
| 101 | out << gc_tag_name(v[i].first) << " " << v[i].second; |
| 102 | } |
| 103 | out << "]"; |
| 104 | } |
| 105 | |
| 106 | void gcReportHistogram ( const gc_root & root, const char * label, TextWriter & out, uint64_t minCount ) { |
| 107 | Histogram histo; |
no test coverage detected