Remove kAtomsWithAttributionChain from atoms_info
Use LogEvent::getAttributionChainIndex() to check presence of attribution chains Bug: 150414252 Test: bit statsd_test:* Change-Id: Ic798d3b182c2b5aaf73444f2796d539cd3f7bf40
This commit is contained in:
@@ -27,7 +27,6 @@ namespace stats_log_api_gen {
|
||||
|
||||
static void write_atoms_info_header_body(FILE* out, const Atoms& atoms) {
|
||||
fprintf(out, "struct AtomsInfo {\n");
|
||||
fprintf(out, " const static std::set<int> kAtomsWithAttributionChain;\n");
|
||||
fprintf(out, " const static std::set<int> kWhitelistedAtoms;\n");
|
||||
fprintf(out, "};\n");
|
||||
fprintf(out, "const static int kMaxPushedAtomId = %d;\n\n", atoms.maxPushedAtomId);
|
||||
@@ -35,22 +34,6 @@ static void write_atoms_info_header_body(FILE* out, const Atoms& atoms) {
|
||||
|
||||
static void write_atoms_info_cpp_body(FILE* out, const Atoms& atoms) {
|
||||
|
||||
fprintf(out, "const std::set<int> AtomsInfo::kAtomsWithAttributionChain = {\n");
|
||||
for (AtomDeclSet::const_iterator atomIt = atoms.decls.begin(); atomIt != atoms.decls.end();
|
||||
atomIt++) {
|
||||
for (vector<AtomField>::const_iterator field = (*atomIt)->fields.begin();
|
||||
field != (*atomIt)->fields.end(); field++) {
|
||||
if (field->javaType == JAVA_TYPE_ATTRIBUTION_CHAIN) {
|
||||
const string constant = make_constant_name((*atomIt)->name);
|
||||
fprintf(out, " %d, // %s\n", (*atomIt)->code, constant.c_str());
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
fprintf(out, "};\n");
|
||||
fprintf(out, "\n");
|
||||
|
||||
fprintf(out, "const std::set<int> AtomsInfo::kWhitelistedAtoms = {\n");
|
||||
for (AtomDeclSet::const_iterator atomIt = atoms.decls.begin(); atomIt != atoms.decls.end();
|
||||
atomIt++) {
|
||||
|
||||
Reference in New Issue
Block a user