OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 5 #ifndef CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
6 #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 6 #define CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
7 | 7 |
| 8 #include <stdint.h> |
| 9 |
8 #include <map> | 10 #include <map> |
9 | 11 |
10 #include "base/callback.h" | 12 #include "base/callback.h" |
11 #include "base/files/file.h" | 13 #include "base/files/file.h" |
| 14 #include "base/macros.h" |
12 #include "base/memory/ref_counted_memory.h" | 15 #include "base/memory/ref_counted_memory.h" |
13 #include "base/task_runner.h" | 16 #include "base/task_runner.h" |
14 #include "base/trace_event/tracing_agent.h" | 17 #include "base/trace_event/tracing_agent.h" |
15 #include "chromeos/chromeos_export.h" | 18 #include "chromeos/chromeos_export.h" |
16 #include "chromeos/dbus/dbus_client.h" | 19 #include "chromeos/dbus/dbus_client.h" |
17 #include "third_party/cros_system_api/dbus/service_constants.h" | 20 #include "third_party/cros_system_api/dbus/service_constants.h" |
18 | 21 |
19 namespace chromeos { | 22 namespace chromeos { |
20 | 23 |
21 // DebugDaemonClient is used to communicate with the debug daemon. | 24 // DebugDaemonClient is used to communicate with the debug daemon. |
(...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
87 const GetNetworkInterfacesCallback& callback) = 0; | 90 const GetNetworkInterfacesCallback& callback) = 0; |
88 | 91 |
89 // Called once GetPerfOutput() is complete only if the the data is | 92 // Called once GetPerfOutput() is complete only if the the data is |
90 // successfully obtained from debugd. | 93 // successfully obtained from debugd. |
91 // Arguments: | 94 // Arguments: |
92 // - The status from running perf. | 95 // - The status from running perf. |
93 // - Output from "perf record", in PerfDataProto format. | 96 // - Output from "perf record", in PerfDataProto format. |
94 // - Output from "perf stat", in PerfStatProto format. | 97 // - Output from "perf stat", in PerfStatProto format. |
95 using GetPerfOutputCallback = | 98 using GetPerfOutputCallback = |
96 base::Callback<void(int status, | 99 base::Callback<void(int status, |
97 const std::vector<uint8>& perf_data, | 100 const std::vector<uint8_t>& perf_data, |
98 const std::vector<uint8>& perf_stat)>; | 101 const std::vector<uint8_t>& perf_stat)>; |
99 | 102 |
100 // Runs perf with arguments for |duration| seconds and returns data collected. | 103 // Runs perf with arguments for |duration| seconds and returns data collected. |
101 virtual void GetPerfOutput(uint32_t duration, | 104 virtual void GetPerfOutput(uint32_t duration, |
102 const std::vector<std::string>& perf_args, | 105 const std::vector<std::string>& perf_args, |
103 const GetPerfOutputCallback& callback) = 0; | 106 const GetPerfOutputCallback& callback) = 0; |
104 | 107 |
105 // Callback type for GetScrubbedLogs(), GetAllLogs() or GetUserLogFiles(). | 108 // Callback type for GetScrubbedLogs(), GetAllLogs() or GetUserLogFiles(). |
106 typedef base::Callback<void(bool succeeded, | 109 typedef base::Callback<void(bool succeeded, |
107 const std::map<std::string, std::string>& logs)> | 110 const std::map<std::string, std::string>& logs)> |
108 GetLogsCallback; | 111 GetLogsCallback; |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 // Create() should be used instead. | 195 // Create() should be used instead. |
193 DebugDaemonClient(); | 196 DebugDaemonClient(); |
194 | 197 |
195 private: | 198 private: |
196 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); | 199 DISALLOW_COPY_AND_ASSIGN(DebugDaemonClient); |
197 }; | 200 }; |
198 | 201 |
199 } // namespace chromeos | 202 } // namespace chromeos |
200 | 203 |
201 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ | 204 #endif // CHROMEOS_DBUS_DEBUG_DAEMON_CLIENT_H_ |
OLD | NEW |