为命令行增加不dump trace的选项

Signed-off-by: chenwei <chenwei469@huawei.com>
This commit is contained in:
chenwei
2023-05-25 15:29:11 +08:00
parent 3ab463f0f8
commit c305ae1eb1
+6
View File
@@ -45,6 +45,7 @@ struct option g_longOptions[] = {
{ "time", required_argument, nullptr, 0 }, // used to specify the time (in seconds) for trace to run.
{ "trace_begin", no_argument, nullptr, 0 },
{ "trace_finish", no_argument, nullptr, 0 },
{ "trace_finish_ndump",no_argument, nullptr, 0 },
{ "trace_dump", no_argument, nullptr, 0 },
{ "list_categories", no_argument, nullptr, 0 },
{ "overwrite", no_argument, nullptr, 0 },
@@ -427,6 +428,11 @@ static bool ParseControlOpt(int optionIndex, bool& isTrue)
g_traceStop = true;
g_traceDump = true;
return true;
} else if (!strcmp(g_longOptions[optionIndex].name, "trace_finish_ndump")) {
g_traceStart = START_NONE;
g_traceStop = true;
g_traceDump = false;
return true;
} else if (!strcmp(g_longOptions[optionIndex].name, "trace_dump")) {
g_traceStart = START_NONE;
g_traceStop = false;