diff options
author | Wei Wang <wvw@google.com> | 2018-02-26 14:02:53 -0800 |
---|---|---|
committer | Wei Wang <wvw@google.com> | 2018-02-26 14:13:51 -0800 |
commit | b2cf025c7d5cebd43084f38c6c7ff9cc17da428a (patch) | |
tree | 06e286adf2a464b39cf69d9ff9c91cad60d79772 /catapult/systrace/atrace_helper/jni/libmemtrack_wrapper.h | |
parent | 3e601f2c29e63f5151aa982790deea52645bc6ea (diff) | |
download | chromium-trace-b2cf025c7d5cebd43084f38c6c7ff9cc17da428a.tar.gz |
Update to latest catapult (3fe65c60)android-9.0.0_r47android-9.0.0_r46android-9.0.0_r45android-9.0.0_r44android-9.0.0_r43android-9.0.0_r42android-9.0.0_r41android-9.0.0_r40android-9.0.0_r39android-9.0.0_r38android-9.0.0_r37android-9.0.0_r36android-9.0.0_r35android-9.0.0_r34android-9.0.0_r33android-9.0.0_r32android-9.0.0_r31android-9.0.0_r30android-9.0.0_r22android-9.0.0_r21android-9.0.0_r20android-9.0.0_r19android-9.0.0_r16android-9.0.0_r12android-9.0.0_r11pie-qpr3-s1-releasepie-qpr3-releasepie-qpr3-b-releasepie-qpr2-releasepie-qpr1-s3-releasepie-qpr1-s2-releasepie-qpr1-s1-releasepie-qpr1-releasepie-dr1-releasepie-dr1-devpie-devpie-b4s4-releasepie-b4s4-dev
Notable changes:
Add clk_set_rate support
Add clock state support
Bug: 73775767
Bug: 73795364
Test: ./systrace.py
Change-Id: Iafb25ba9750f0e4cea6c8278788d8837e4a8776a
Diffstat (limited to 'catapult/systrace/atrace_helper/jni/libmemtrack_wrapper.h')
-rw-r--r-- | catapult/systrace/atrace_helper/jni/libmemtrack_wrapper.h | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/catapult/systrace/atrace_helper/jni/libmemtrack_wrapper.h b/catapult/systrace/atrace_helper/jni/libmemtrack_wrapper.h new file mode 100644 index 00000000..cec5cecd --- /dev/null +++ b/catapult/systrace/atrace_helper/jni/libmemtrack_wrapper.h @@ -0,0 +1,39 @@ +// Copyright 2017 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef LIBMEMTRACK_WRAPPER_H_ +#define LIBMEMTRACK_WRAPPER_H_ + +#include <stdint.h> + +// Wrapper on top of libmemtrack API. + +// Opaque structure with memory stats. +// See $ANDROID/system/core/libmemtrack/include/memtrack/memtrack.h for details. +struct libmemtrack_proc; + +// These numbers are vendor-specific and can't be trusted as a stable metric +// across different hardware or driver versions. +class MemtrackProc { + public: + explicit MemtrackProc(int pid); + ~MemtrackProc(); + + uint64_t graphics_total() const; + uint64_t graphics_pss() const; + uint64_t gl_total() const; + uint64_t gl_pss() const; + uint64_t other_total() const; + uint64_t other_pss() const; + + bool has_errors() const { return proc_ == nullptr; }; + + private: + MemtrackProc(const MemtrackProc&) = delete; + void operator=(const MemtrackProc&) = delete; + + libmemtrack_proc* proc_ = nullptr; +}; + +#endif // LIBMEMTRACK_WRAPPER_H_ |