Sam Leffler | f81eaa8 | 2012-03-01 09:50:30 -0800 | [diff] [blame] | 1 | // Copyright (c) 2012 The Chromium OS Authors. All rights reserved. |
| 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 5 | #ifndef DEBUGD_SRC_SYSTRACE_TOOL_H_ |
| 6 | #define DEBUGD_SRC_SYSTRACE_TOOL_H_ |
Sam Leffler | f81eaa8 | 2012-03-01 09:50:30 -0800 | [diff] [blame] | 7 | |
Sam Leffler | f81eaa8 | 2012-03-01 09:50:30 -0800 | [diff] [blame] | 8 | #include <string> |
| 9 | |
Eric Caruso | 0b24188 | 2018-04-04 13:43:46 -0700 | [diff] [blame] | 10 | #include <base/files/scoped_file.h> |
Ben Chan | 657bed8 | 2014-09-02 20:40:51 -0700 | [diff] [blame] | 11 | #include <base/macros.h> |
Sam Leffler | f81eaa8 | 2012-03-01 09:50:30 -0800 | [diff] [blame] | 12 | |
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 13 | #include "debugd/src/subprocess_tool.h" |
Sam Leffler | f81eaa8 | 2012-03-01 09:50:30 -0800 | [diff] [blame] | 14 | |
| 15 | namespace debugd { |
| 16 | |
| 17 | class SystraceTool { |
| 18 | public: |
Ben Chan | 78f8953 | 2014-08-29 09:35:09 -0700 | [diff] [blame] | 19 | SystraceTool() = default; |
Qijiang Fan | 6bc59e1 | 2020-11-11 02:51:06 +0900 | [diff] [blame^] | 20 | SystraceTool(const SystraceTool&) = delete; |
| 21 | SystraceTool& operator=(const SystraceTool&) = delete; |
| 22 | |
Ben Chan | 78f8953 | 2014-08-29 09:35:09 -0700 | [diff] [blame] | 23 | ~SystraceTool() = default; |
Sam Leffler | f81eaa8 | 2012-03-01 09:50:30 -0800 | [diff] [blame] | 24 | |
Eric Caruso | c93a15c | 2017-04-24 16:15:12 -0700 | [diff] [blame] | 25 | std::string Start(const std::string& categories); |
Eric Caruso | 0b24188 | 2018-04-04 13:43:46 -0700 | [diff] [blame] | 26 | void Stop(const base::ScopedFD& outfd); |
Eric Caruso | c93a15c | 2017-04-24 16:15:12 -0700 | [diff] [blame] | 27 | std::string Status(); |
Sam Leffler | f81eaa8 | 2012-03-01 09:50:30 -0800 | [diff] [blame] | 28 | }; |
| 29 | |
Ben Chan | a0011d8 | 2014-05-13 00:19:29 -0700 | [diff] [blame] | 30 | } // namespace debugd |
Sam Leffler | f81eaa8 | 2012-03-01 09:50:30 -0800 | [diff] [blame] | 31 | |
Alex Vakulenko | 262be3f | 2014-07-30 15:25:50 -0700 | [diff] [blame] | 32 | #endif // DEBUGD_SRC_SYSTRACE_TOOL_H_ |