Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(961)

Side by Side Diff: systrace/atrace_helper/jni/libmemtrack_wrapper.h

Issue 2946033002: Android systrace: Optimize memory dumps. (Closed)
Patch Set: for review Created 3 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2017 The Chromium Authors. All rights reserved. 1 // Copyright 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef LIBMEMTRACK_WRAPPER_H_ 5 #ifndef LIBMEMTRACK_WRAPPER_H_
6 #define LIBMEMTRACK_WRAPPER_H_ 6 #define LIBMEMTRACK_WRAPPER_H_
7 7
8 #include <stdint.h> 8 #include <stdint.h>
9 9
10 // Wrapper on top of libmemtrack API. 10 // Wrapper on top of libmemtrack API.
11 11
12 // Opaque structure with memory stats. 12 // Opaque structure with memory stats.
13 // See $ANDROID/system/core/libmemtrack/include/memtrack/memtrack.h for details. 13 // See $ANDROID/system/core/libmemtrack/include/memtrack/memtrack.h for details.
14 struct libmemtrack_proc; 14 struct libmemtrack_proc;
15 15
16 // These numbers are vendor-specific and can't be trusted as a stable metric 16 // These numbers are vendor-specific and can't be trusted as a stable metric
17 // across different hardware or driver versions. 17 // across different hardware or driver versions.
18 class MemtrackProc { 18 class MemtrackProc {
19 public: 19 public:
20 explicit MemtrackProc(int pid); 20 explicit MemtrackProc(int pid);
21 ~MemtrackProc(); 21 ~MemtrackProc();
22 22
23 uint64_t graphics_total() const; 23 uint64_t graphics_total() const;
24 uint64_t graphics_pss() const; 24 uint64_t graphics_pss() const;
25 uint64_t gl_total() const; 25 uint64_t gl_total() const;
26 uint64_t gl_pss() const; 26 uint64_t gl_pss() const;
27 uint64_t other_total() const; 27 uint64_t other_total() const;
28 uint64_t other_pss() const; 28 uint64_t other_pss() const;
29 29
30 bool has_errors() const { return proc_ != nullptr; }; 30 bool has_errors() const { return proc_ == nullptr; };
kraynov 2017/06/21 14:23:36 It was mistake
31 31
32 private: 32 private:
33 MemtrackProc(const MemtrackProc&) = delete; 33 MemtrackProc(const MemtrackProc&) = delete;
34 void operator=(const MemtrackProc&) = delete; 34 void operator=(const MemtrackProc&) = delete;
35 35
36 libmemtrack_proc* proc_ = nullptr; 36 libmemtrack_proc* proc_ = nullptr;
37 }; 37 };
38 38
39 #endif // LIBMEMTRACK_WRAPPER_H_ 39 #endif // LIBMEMTRACK_WRAPPER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698