diff options
author | Colin Cross <ccross@android.com> | 2019-08-13 17:03:15 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-09-05 14:46:16 -0700 |
commit | 43b95eae1e56d289640160a451acc3a8fbfe15b2 (patch) | |
tree | 97105ac05ffd730f6e81724369f34aeecf23d950 /boottime_tools | |
parent | 3342738e82b07afeccf0bc9962ff047093335a1f (diff) | |
download | extras-43b95eae1e56d289640160a451acc3a8fbfe15b2.tar.gz |
Adapt to google::protobuf::int64 type change and scoped_ptr removal
Protobuf 3.9.1 redefines google::protobuf::int64 from long long to
int64_t, which is sometimes long and sometimes long long. Use
PRId64 to print it.
scoped_ptr has been removed, use std::unique_ptr instead.
Bug: 117607748
Test: m checkbuild
Change-Id: Idfcaba262c27cf2b895a0a6ded8394c8465547e8
Merged-In: Idfcaba262c27cf2b895a0a6ded8394c8465547e8
Diffstat (limited to 'boottime_tools')
-rw-r--r-- | boottime_tools/bootio/bootio_collector.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/boottime_tools/bootio/bootio_collector.cpp b/boottime_tools/bootio/bootio_collector.cpp index 495a9aa4..dc13525e 100644 --- a/boottime_tools/bootio/bootio_collector.cpp +++ b/boottime_tools/bootio/bootio_collector.cpp @@ -275,10 +275,8 @@ void PrintPids(DataContainer& data, std::unordered_map<int, uint64_t>& cpuDataMa stats.rbytes += (newerSample->readbytes() - olderSample->readbytes()); stats.wbytes += (newerSample->writebytes() - olderSample->writebytes()); - // Note that all of these are explicitly `long long`s, not int64_t, - // so we can't use PRId64 here. -#define NUMBER "%-13lld" - printf("%5lld - %-5lld " NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER "%-9.2f\n", +#define NUMBER "%-13" PRId64 + printf("%5" PRId64 " - %-5" PRId64 " " NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER "%-9.2f\n", #undef NUMBER olderSample->uptime(), newerSample->uptime(), @@ -292,7 +290,7 @@ void PrintPids(DataContainer& data, std::unordered_map<int, uint64_t>& cpuDataMa isFirstSample = false; } printf("-----------------------------------------------------------------------------\n"); -#define NUMBER "%-13lld" +#define NUMBER "%-13" PRId64 printf("%-15s" NUMBER NUMBER NUMBER NUMBER NUMBER NUMBER "\n", #undef NUMBER "Total", |