Searched refs:Command (Results 1 - 25 of 31) sorted by relevance

12

/system/extras/simpleperf/
H A Dcmd_help.cpp25 class HelpCommand : public Command {
28 : Command("help", "print help information for simpleperf",
40 void PrintLongHelpForOneCommand(const Command& cmd);
47 std::unique_ptr<Command> cmd = CreateCommandInstance(args[0]);
75 std::unique_ptr<Command> cmd = CreateCommandInstance(cmd_name);
80 void HelpCommand::PrintLongHelpForOneCommand(const Command& command) {
86 [] { return std::unique_ptr<Command>(new HelpCommand); });
H A Dcommand_test.cpp21 class MockCommand : public Command {
23 MockCommand() : Command("mock", "mock_short_help", "mock_long_help") {
33 RegisterCommand("mock1", [] { return std::unique_ptr<Command>(new MockCommand); });
41 RegisterCommand("mock1", [] { return std::unique_ptr<Command>(new MockCommand); });
H A Dcommand.h27 class Command { class
29 Command(const std::string& name, const std::string& short_help_string, function in class:Command
34 virtual ~Command() {
60 DISALLOW_COPY_AND_ASSIGN(Command);
64 const std::function<std::unique_ptr<Command>(void)>& callback);
66 std::unique_ptr<Command> CreateCommandInstance(const std::string& cmd_name);
H A Dcmd_dumprecord_test.cpp22 static std::unique_ptr<Command> DumpCmd() {
H A Dcmd_list_test.cpp28 std::unique_ptr<Command> list_cmd;
H A Dcommand.cpp28 bool Command::NextArgumentOrError(const std::vector<std::string>& args, size_t* pi) {
38 void Command::ReportUnknownOption(const std::vector<std::string>& args, size_t i) {
43 typedef std::function<std::unique_ptr<Command>(void)> callback_t;
46 // commands is used in the constructor of Command. Defining it as a static
53 const std::function<std::unique_ptr<Command>(void)>& callback) {
61 std::unique_ptr<Command> CreateCommandInstance(const std::string& cmd_name) {
132 std::unique_ptr<Command> command = CreateCommandInstance(args[0]);
H A Dcmd_list.cpp91 class ListCommand : public Command {
94 : Command("list", "list available event types",
142 RegisterCommand("list", [] { return std::unique_ptr<Command>(new ListCommand); });
H A Dcmd_dumprecord.cpp36 class DumpRecordCommand : public Command {
39 : Command("dump", "dump perf record file",
240 RegisterCommand("dump", [] { return std::unique_ptr<Command>(new DumpRecordCommand); });
H A Dcmd_report_sample_test.cpp25 static std::unique_ptr<Command> ReportSampleCmd() {
H A Dcmd_kmem.cpp274 class KmemCommand : public Command {
277 : Command(
468 std::unique_ptr<Command> record_cmd = CreateCommandInstance("record");
715 [] { return std::unique_ptr<Command>(new KmemCommand()); });
H A Dcmd_kmem_test.cpp31 static std::unique_ptr<Command> KmemCmd() {
H A Dcmd_report_sample.cpp59 class ReportSampleCommand : public Command {
62 : Command(
605 return std::unique_ptr<Command>(new ReportSampleCommand());
H A Dcmd_stat.cpp268 class StatCommand : public Command {
271 : Command("stat", "gather performance counter information",
677 [] { return std::unique_ptr<Command>(new StatCommand); });
H A Dcmd_stat_test.cpp30 static std::unique_ptr<Command> StatCmd() {
H A Dcmd_report_test.cpp32 static std::unique_ptr<Command> ReportCmd() {
104 ASSERT_NE(lines[line_index].find("Command"), std::string::npos);
477 static std::unique_ptr<Command> RecordCmd() {
/system/connectivity/wifilogd/tests/
H A Dprotocol_unittest.cpp53 using protocol::Command;
54 ASSERT_TRUE(std::is_standard_layout<Command>::value);
56 EXPECT_EQ(0U, offsetof(Command, src_boottime_nsec));
57 EXPECT_EQ(8U, sizeof(Command::src_boottime_nsec));
59 EXPECT_EQ(8U, offsetof(Command, sequence_num));
60 EXPECT_EQ(2U, sizeof(Command::sequence_num));
62 EXPECT_EQ(10U, offsetof(Command, opcode));
63 EXPECT_EQ(2U, sizeof(Command::opcode));
65 EXPECT_EQ(12U, offsetof(Command, payload_len));
66 EXPECT_EQ(2U, sizeof(Command
[all...]
H A Dmain_loop_unittest.cpp81 Return(std::tuple<size_t, Os::Errno>{sizeof(protocol::Command), 0}));
83 ProcessCommand(_, sizeof(protocol::Command), _));
H A Dcommand_processor_unittest.cpp63 sizeof(protocol::Command) -
107 protocol::Command()
111 GetMaxVal<decltype(protocol::Command::payload_len)>()));
146 const auto& command = protocol::Command()
168 // If the buffer given to ProcessCommand() is shorter than a protocol::Command,
175 command_buffer.data(), sizeof(protocol::Command) - 1, Os::kInvalidFd));
219 using opcode_enum_t = decltype(protocol::Command::opcode);
224 protocol::Command()
/system/connectivity/wifilogd/
H A Dprotocol.h53 struct Command { struct in namespace:android::wifilogd::protocol
54 Command& set_opcode(Opcode new_opcode) {
59 Command& set_payload_len(uint16_t new_payload_len) {
H A Dcommand_processor.cpp137 if (n_bytes_read < sizeof(protocol::Command)) {
143 CopyFromBufferOrDie<protocol::Command>(input_buffer, n_bytes_read);
217 buffer_reader.CopyOutOrDie<protocol::Command>();
/system/netd/netutils_wrappers/
H A DNetUtilsWrapperTest-1.0.cpp30 struct Command { struct
35 std::vector<Command> COMMANDS = {
61 for (const Command& cmd : COMMANDS) {
/system/sepolicy/
H A Ddefinitions.mk0 # Command to turn collection of policy files into a policy.conf file to be
/system/nvram/messages/include/nvram/messages/
H A Dnvram_messages.h30 enum Command { enum in namespace:nvram
143 Command,
162 Command,
/system/core/init/
H A Daction.h33 class Command { class in namespace:android::init
35 Command(BuiltinFunction f, const std::vector<std::string>& args, int line);
78 void ExecuteCommand(const Command& command) const;
85 std::vector<Command> commands_;
H A Daction.cpp31 Command::Command(BuiltinFunction f, const std::vector<std::string>& args, int line) function in class:android::init::Command
34 int Command::InvokeFunc() const {
48 std::string Command::BuildCommandString() const {
81 // We need a copy here since some Command execution may result in
83 Command cmd = commands_[command];
93 void Action::ExecuteCommand(const Command& command) const {
103 LOG(INFO) << "Command '" << cmd_str << "' action=" << trigger_name << " (" << filename_

Completed in 850 milliseconds

12