#include <linux/compiler.h>
#include <subcmd/parse-options.h>
#include "data-convert.h"
#include "data-convert-bt.h"
typedef int (*data_cmd_fn_t)(int argc, const char **argv);
static struct data_cmd data_cmds[];
#define for_each_cmd(cmd) \
for (cmd = data_cmds; cmd && cmd->name; cmd++)
static const struct option data_options[] = {
static const char * const data_subcommands[] = { "convert", NULL };
static const char *data_usage[] = {
"perf data [<common options>] <command> [<options>]",
static void print_usage(void)
printf("\t%s\n\n", data_usage[0]);
printf("\tAvailable commands:\n");
printf("\t %s\t- %s\n", cmd->name, cmd->summary);
static const char * const data_convert_usage[] = {
"perf data convert [<options>]",
static int cmd_data_convert(int argc, const char **argv)
const char *to_ctf = NULL;
struct perf_data_convert_opts opts = {
const struct option options[] = {
OPT_INCR('v', "verbose", &verbose, "be more verbose"),
OPT_STRING('i', "input", &input_name, "file", "input file name"),