int overwrite;
int bufnum;
int bufsize;
+ int switch_timer;
};
struct lttctl_option {
printf(" channel.<channelname>.bufsize= (in bytes, rounded to "
"next power of 2)\n");
printf(" <channelname> can be set to all for all channels\n");
+ printf(" channel.<channelname>.switch_timer= (timer interval in "
+ "ms)\n");
printf("\n");
printf(" Integration options:\n");
printf(" -C, --create_start\n");
opt->overwrite = -1;
opt->bufnum = -1;
opt->bufsize = -1;
+ opt->switch_timer = -1;
strcpy(opt->chan_name, opt_name);
}
}
opt->bufsize = opt_val;
return 0;
+ } else if (!strcmp("switch_timer", opt_name)) {
+ ret = sscanf(opt_valstr, "%d", &opt_val);
+ if (ret != 1 || opt_val < 0) {
+ return -EINVAL;
+ }
+
+ opt->switch_timer = opt_val;
+ return 0;
} else {
return -EINVAL;
}
opt->bufsize)) != 0)
return ret;
}
+ if (opt->switch_timer != -1) {
+ if ((ret = lttctl_set_channel_switch_timer(opt_tracename,
+ opt->chan_name, opt->switch_timer)) != 0)
+ return ret;
+ }
return 0;
}