blob: 54ffca0d53c9ea14f0a0152632755818bf754316 [file] [log] [blame]
Sam Lefflerf81eaa82012-03-01 09:50:30 -08001// 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 Vakulenko262be3f2014-07-30 15:25:50 -07005#ifndef DEBUGD_SRC_SYSTRACE_TOOL_H_
6#define DEBUGD_SRC_SYSTRACE_TOOL_H_
Sam Lefflerf81eaa82012-03-01 09:50:30 -08007
Sam Lefflerf81eaa82012-03-01 09:50:30 -08008#include <string>
9
Eric Caruso0b241882018-04-04 13:43:46 -070010#include <base/files/scoped_file.h>
Ben Chan657bed82014-09-02 20:40:51 -070011#include <base/macros.h>
Sam Lefflerf81eaa82012-03-01 09:50:30 -080012
Alex Vakulenko262be3f2014-07-30 15:25:50 -070013#include "debugd/src/subprocess_tool.h"
Sam Lefflerf81eaa82012-03-01 09:50:30 -080014
15namespace debugd {
16
17class SystraceTool {
18 public:
Ben Chan78f89532014-08-29 09:35:09 -070019 SystraceTool() = default;
Qijiang Fan6bc59e12020-11-11 02:51:06 +090020 SystraceTool(const SystraceTool&) = delete;
21 SystraceTool& operator=(const SystraceTool&) = delete;
22
Ben Chan78f89532014-08-29 09:35:09 -070023 ~SystraceTool() = default;
Sam Lefflerf81eaa82012-03-01 09:50:30 -080024
Eric Carusoc93a15c2017-04-24 16:15:12 -070025 std::string Start(const std::string& categories);
Eric Caruso0b241882018-04-04 13:43:46 -070026 void Stop(const base::ScopedFD& outfd);
Eric Carusoc93a15c2017-04-24 16:15:12 -070027 std::string Status();
Sam Lefflerf81eaa82012-03-01 09:50:30 -080028};
29
Ben Chana0011d82014-05-13 00:19:29 -070030} // namespace debugd
Sam Lefflerf81eaa82012-03-01 09:50:30 -080031
Alex Vakulenko262be3f2014-07-30 15:25:50 -070032#endif // DEBUGD_SRC_SYSTRACE_TOOL_H_