|
@@ -846,6 +846,8 @@ static const struct perf_evsel_str_handler lock_tracepoints[] = {
|
|
{ "lock:lock_release", perf_evsel__process_lock_release, }, /* CONFIG_LOCKDEP */
|
|
{ "lock:lock_release", perf_evsel__process_lock_release, }, /* CONFIG_LOCKDEP */
|
|
};
|
|
};
|
|
|
|
|
|
|
|
+static bool force;
|
|
|
|
+
|
|
static int __cmd_report(bool display_info)
|
|
static int __cmd_report(bool display_info)
|
|
{
|
|
{
|
|
int err = -EINVAL;
|
|
int err = -EINVAL;
|
|
@@ -857,6 +859,7 @@ static int __cmd_report(bool display_info)
|
|
struct perf_data_file file = {
|
|
struct perf_data_file file = {
|
|
.path = input_name,
|
|
.path = input_name,
|
|
.mode = PERF_DATA_MODE_READ,
|
|
.mode = PERF_DATA_MODE_READ,
|
|
|
|
+ .force = force,
|
|
};
|
|
};
|
|
|
|
|
|
session = perf_session__new(&file, false, &eops);
|
|
session = perf_session__new(&file, false, &eops);
|
|
@@ -945,6 +948,7 @@ int cmd_lock(int argc, const char **argv, const char *prefix __maybe_unused)
|
|
"dump thread list in perf.data"),
|
|
"dump thread list in perf.data"),
|
|
OPT_BOOLEAN('m', "map", &info_map,
|
|
OPT_BOOLEAN('m', "map", &info_map,
|
|
"map of lock instances (address:name table)"),
|
|
"map of lock instances (address:name table)"),
|
|
|
|
+ OPT_BOOLEAN('f', "force", &force, "don't complain, do it"),
|
|
OPT_END()
|
|
OPT_END()
|
|
};
|
|
};
|
|
const struct option lock_options[] = {
|
|
const struct option lock_options[] = {
|
|
@@ -956,6 +960,7 @@ int cmd_lock(int argc, const char **argv, const char *prefix __maybe_unused)
|
|
const struct option report_options[] = {
|
|
const struct option report_options[] = {
|
|
OPT_STRING('k', "key", &sort_key, "acquired",
|
|
OPT_STRING('k', "key", &sort_key, "acquired",
|
|
"key for sorting (acquired / contended / avg_wait / wait_total / wait_max / wait_min)"),
|
|
"key for sorting (acquired / contended / avg_wait / wait_total / wait_max / wait_min)"),
|
|
|
|
+ OPT_BOOLEAN('f', "force", &force, "don't complain, do it"),
|
|
/* TODO: type */
|
|
/* TODO: type */
|
|
OPT_END()
|
|
OPT_END()
|
|
};
|
|
};
|