diff options
author | Colin Cross <ccross@android.com> | 2019-08-13 17:03:15 -0700 |
---|---|---|
committer | Colin Cross <ccross@android.com> | 2019-09-04 12:48:50 -0700 |
commit | cfffef9448738ccace74ae1b315fbc623a7618c7 (patch) | |
tree | 71e4cdf7fc2af17b3b6ddc01426c54d2511154c3 /boottime_tools | |
parent | 2062c7d29184370cd43844ffa200c427572d525e (diff) | |
download | extras-cfffef9448738ccace74ae1b315fbc623a7618c7.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
Exempt-From-Owner-Approval: approved at https://android-review.googlesource.com/q/Idfcaba262c27cf2b895a0a6ded8394c8465547e8
Change-Id: 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", |