diff options
author | Yi Jin <jinyithu@google.com> | 2018-03-05 18:18:27 -0800 |
---|---|---|
committer | Yi Jin <jinyithu@google.com> | 2018-03-05 18:18:27 -0800 |
commit | 5ee0787024cc446a21008ff5710dec19c6afc834 (patch) | |
tree | d4dec75efaf8df8de9385f298d3ff91193048390 /cmds/incident_helper | |
parent | d97a0f1ac58d64462316f2b0d32162a01e3f828c (diff) |
Use uint64_t instead of long long as API type for consistent reason.
Bug: 74118023
Test: manual
Change-Id: Icd5f506c76d3a008a79cb6c9d2061962ca7fdd40
Diffstat (limited to 'cmds/incident_helper')
10 files changed, 18 insertions, 18 deletions
diff --git a/cmds/incident_helper/src/ih_util.cpp b/cmds/incident_helper/src/ih_util.cpp index 847b26a39ffe..5b413e99cc3b 100644 --- a/cmds/incident_helper/src/ih_util.cpp +++ b/cmds/incident_helper/src/ih_util.cpp @@ -440,7 +440,7 @@ void Message::startSession(ProtoOutputStream* proto, const string& name) { uint64_t fieldId = mTable->mFields[name]; - long long token = proto->start(fieldId); + uint64_t token = proto->start(fieldId); mPreviousField = name; mTokens.push(token); } diff --git a/cmds/incident_helper/src/ih_util.h b/cmds/incident_helper/src/ih_util.h index 53f443873e4d..c4eda4af4333 100644 --- a/cmds/incident_helper/src/ih_util.h +++ b/cmds/incident_helper/src/ih_util.h @@ -194,7 +194,7 @@ public: private: Table* mTable; std::string mPreviousField; - stack<long long> mTokens; + stack<uint64_t> mTokens; map<std::string, Message*> mSubMessages; }; diff --git a/cmds/incident_helper/src/parsers/CpuFreqParser.cpp b/cmds/incident_helper/src/parsers/CpuFreqParser.cpp index fde17bd97a7f..43a12f603ba3 100644 --- a/cmds/incident_helper/src/parsers/CpuFreqParser.cpp +++ b/cmds/incident_helper/src/parsers/CpuFreqParser.cpp @@ -65,10 +65,10 @@ CpuFreqParser::Parse(const int in, const int out) const proto.write(CpuFreqProto::JIFFY_HZ, (int)jiffyHz); for (int i=0; i<numCpus; i++) { - long long token = proto.start(CpuFreqProto::CPU_FREQS); + uint64_t token = proto.start(CpuFreqProto::CPU_FREQS); proto.write(CpuFreqProto::Stats::CPU_NAME, header[i+1]); for (vector<pair<int, long long>>::iterator it = cpucores[i].begin(); it != cpucores[i].end(); it++) { - long long stateToken = proto.start(CpuFreqProto::Stats::TIMES); + uint64_t stateToken = proto.start(CpuFreqProto::Stats::TIMES); proto.write(CpuFreqProto::Stats::TimeInState::STATE_KHZ, it->first); proto.write(CpuFreqProto::Stats::TimeInState::TIME_JIFFY, it->second); proto.end(stateToken); diff --git a/cmds/incident_helper/src/parsers/CpuInfoParser.cpp b/cmds/incident_helper/src/parsers/CpuInfoParser.cpp index b2b431c62866..eed68b9e29c6 100644 --- a/cmds/incident_helper/src/parsers/CpuInfoParser.cpp +++ b/cmds/incident_helper/src/parsers/CpuInfoParser.cpp @@ -28,7 +28,7 @@ static void writeSuffixLine(ProtoOutputStream* proto, uint64_t fieldId, const int count, const char* names[], const uint64_t ids[]) { record_t record = parseRecord(line, delimiter); - long long token = proto->start(fieldId); + uint64_t token = proto->start(fieldId); for (int i=0; i<(int)record.size(); i++) { for (int j=0; j<count; j++) { if (stripSuffix(&record[i], names[j], true)) { @@ -138,7 +138,7 @@ CpuInfoParser::Parse(const int in, const int out) const continue; } - long long token = proto.start(CpuInfoProto::TASKS); + uint64_t token = proto.start(CpuInfoProto::TASKS); for (int i=0; i<(int)record.size(); i++) { if (!table.insertField(&proto, header[i], record[i])) { fprintf(stderr, "[%s]Line %d fails to insert field %s with value %s\n", diff --git a/cmds/incident_helper/src/parsers/EventLogTagsParser.cpp b/cmds/incident_helper/src/parsers/EventLogTagsParser.cpp index 73e37bd166cd..4fd6b068cf1e 100644 --- a/cmds/incident_helper/src/parsers/EventLogTagsParser.cpp +++ b/cmds/incident_helper/src/parsers/EventLogTagsParser.cpp @@ -41,7 +41,7 @@ EventLogTagsParser::Parse(const int in, const int out) const continue; } - long long token = proto.start(EventLogTagMapProto::EVENT_LOG_TAGS); + uint64_t token = proto.start(EventLogTagMapProto::EVENT_LOG_TAGS); proto.write(EventLogTag::TAG_NUMBER, toInt(tagNumber)); proto.write(EventLogTag::TAG_NAME, tagName); @@ -52,7 +52,7 @@ EventLogTagsParser::Parse(const int in, const int out) const // If the parts doesn't contains pipe, then skips it. continue; } - long long descriptorToken = proto.start(EventLogTag::VALUE_DESCRIPTORS); + uint64_t descriptorToken = proto.start(EventLogTag::VALUE_DESCRIPTORS); proto.write(EventLogTag::ValueDescriptor::NAME, valueDescriptor[0]); proto.write(EventLogTag::ValueDescriptor::TYPE, toInt(valueDescriptor[1])); if (valueDescriptor.size() == 3) { diff --git a/cmds/incident_helper/src/parsers/KernelWakesParser.cpp b/cmds/incident_helper/src/parsers/KernelWakesParser.cpp index 28816ea75a75..85beaf06eeb8 100644 --- a/cmds/incident_helper/src/parsers/KernelWakesParser.cpp +++ b/cmds/incident_helper/src/parsers/KernelWakesParser.cpp @@ -59,7 +59,7 @@ KernelWakesParser::Parse(const int in, const int out) const continue; } - long long token = proto.start(KernelWakeSourcesProto::WAKEUP_SOURCES); + uint64_t token = proto.start(KernelWakeSourcesProto::WAKEUP_SOURCES); for (int i=0; i<(int)record.size(); i++) { if (!table.insertField(&proto, header[i], record[i])) { fprintf(stderr, "[%s]Line %d has bad value %s of %s\n", diff --git a/cmds/incident_helper/src/parsers/PageTypeInfoParser.cpp b/cmds/incident_helper/src/parsers/PageTypeInfoParser.cpp index ab4382ac13f4..0615c74b8d64 100644 --- a/cmds/incident_helper/src/parsers/PageTypeInfoParser.cpp +++ b/cmds/incident_helper/src/parsers/PageTypeInfoParser.cpp @@ -64,7 +64,7 @@ PageTypeInfoParser::Parse(const int in, const int out) const record_t record = parseRecord(line, COMMA_DELIMITER); if (migrateTypeSession && record.size() == 3) { - long long token = proto.start(PageTypeInfoProto::MIGRATE_TYPES); + uint64_t token = proto.start(PageTypeInfoProto::MIGRATE_TYPES); // expect part 0 starts with "Node" if (stripPrefix(&record[0], "Node")) { proto.write(PageTypeInfoProto::MigrateType::NODE, toInt(record[0])); @@ -93,7 +93,7 @@ PageTypeInfoParser::Parse(const int in, const int out) const proto.end(token); } else if (!blockHeader.empty() && record.size() == 2) { - long long token = proto.start(PageTypeInfoProto::BLOCKS); + uint64_t token = proto.start(PageTypeInfoProto::BLOCKS); if (stripPrefix(&record[0], "Node")) { proto.write(PageTypeInfoProto::Block::NODE, toInt(record[0])); } else return BAD_VALUE; diff --git a/cmds/incident_helper/src/parsers/ProcrankParser.cpp b/cmds/incident_helper/src/parsers/ProcrankParser.cpp index c1c458e69ddf..4763b482e368 100644 --- a/cmds/incident_helper/src/parsers/ProcrankParser.cpp +++ b/cmds/incident_helper/src/parsers/ProcrankParser.cpp @@ -66,7 +66,7 @@ ProcrankParser::Parse(const int in, const int out) const continue; } - long long token = proto.start(ProcrankProto::PROCESSES); + uint64_t token = proto.start(ProcrankProto::PROCESSES); for (int i=0; i<(int)record.size(); i++) { if (!table.insertField(&proto, header[i], record[i])) { fprintf(stderr, "[%s]Line %d has bad value %s of %s\n", @@ -77,22 +77,22 @@ ProcrankParser::Parse(const int in, const int out) const } // add summary - long long token = proto.start(ProcrankProto::SUMMARY); + uint64_t token = proto.start(ProcrankProto::SUMMARY); if (!total.empty()) { record = parseRecord(total); - long long token = proto.start(ProcrankProto::Summary::TOTAL); + uint64_t token = proto.start(ProcrankProto::Summary::TOTAL); for (int i=(int)record.size(); i>0; i--) { table.insertField(&proto, header[header.size() - i].c_str(), record[record.size() - i].c_str()); } proto.end(token); } if (!zram.empty()) { - long long token = proto.start(ProcrankProto::Summary::ZRAM); + uint64_t token = proto.start(ProcrankProto::Summary::ZRAM); proto.write(ProcrankProto::Summary::Zram::RAW_TEXT, zram); proto.end(token); } if (!ram.empty()) { - long long token = proto.start(ProcrankProto::Summary::RAM); + uint64_t token = proto.start(ProcrankProto::Summary::RAM); proto.write(ProcrankProto::Summary::Ram::RAW_TEXT, ram); proto.end(token); } diff --git a/cmds/incident_helper/src/parsers/PsParser.cpp b/cmds/incident_helper/src/parsers/PsParser.cpp index 420775fb5f04..8d64064e26f4 100644 --- a/cmds/incident_helper/src/parsers/PsParser.cpp +++ b/cmds/incident_helper/src/parsers/PsParser.cpp @@ -71,7 +71,7 @@ status_t PsParser::Parse(const int in, const int out) const { continue; } - long long token = proto.start(PsProto::PROCESSES); + uint64_t token = proto.start(PsProto::PROCESSES); for (int i=0; i<(int)record.size(); i++) { if (!table.insertField(&proto, header[i], record[i])) { fprintf(stderr, "[%s]Line %d has bad value %s of %s\n", diff --git a/cmds/incident_helper/src/parsers/SystemPropertiesParser.cpp b/cmds/incident_helper/src/parsers/SystemPropertiesParser.cpp index 7b0ac0b8452b..eba536bd9e9c 100644 --- a/cmds/incident_helper/src/parsers/SystemPropertiesParser.cpp +++ b/cmds/incident_helper/src/parsers/SystemPropertiesParser.cpp @@ -207,7 +207,7 @@ SystemPropertiesParser::Parse(const int in, const int out) const sysProp.endSession(&proto); for (auto it = extras.begin(); it != extras.end(); it++) { - long long token = proto.start(SystemPropertiesProto::EXTRA_PROPERTIES); + uint64_t token = proto.start(SystemPropertiesProto::EXTRA_PROPERTIES); proto.write(SystemPropertiesProto::Property::NAME, it->first); proto.write(SystemPropertiesProto::Property::VALUE, it->second); proto.end(token); |