/* because str is read-only */
s = os = strdup(str); if (!s) return -1;
for (;;) {
p = strchr(s, ','); if (p)
*p = '\0';
for (br = branch_modes; br->name; br++) { if (!strcasecmp(s, br->name)) break;
} if (!br->name) {
ret = -1;
pr_warning("unknown branch filter %s," " check man page\n", s); goto error;
}
*mode |= br->mode;
if (!p) break;
s = p + 1;
}
/* default to any branch */ if ((*mode & ~ONLY_PLM) == 0) {
*mode = PERF_SAMPLE_BRANCH_ANY;
}
error:
free(os); return ret;
}
int
parse_branch_stack(conststruct option *opt, constchar *str, int unset)
{
__u64 *mode = (__u64 *)opt->value;
if (unset) return 0;
/* * cannot set it twice, -b + --branch-filter for instance
*/ if (*mode) {
pr_err("Error: Can't use --branch-any (-b) with --branch-filter (-j).\n"); return -1;
}
return parse_branch_str(str, mode);
}
Messung V0.5
¤ Dauer der Verarbeitung: 0.1 Sekunden
(vorverarbeitet)
¤
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.