lists.openwall.net | lists / announce owl-users owl-dev john-users john-dev passwdqc-users yescrypt popa3d-users / oss-security kernel-hardening musl sabotage tlsify passwords / crypt-dev xvendor / Bugtraq Full-Disclosure linux-kernel linux-netdev linux-ext4 linux-hardening linux-cve-announce PHC | |
Open Source and information security mailing list archives
| ||
|
Date: Wed, 22 Apr 2015 09:23:09 +0300 From: Adrian Hunter <adrian.hunter@...el.com> To: Arnaldo Carvalho de Melo <acme@...nel.org> CC: Peter Zijlstra <peterz@...radead.org>, linux-kernel@...r.kernel.org, David Ahern <dsahern@...il.com>, Frederic Weisbecker <fweisbec@...il.com>, Jiri Olsa <jolsa@...hat.com>, Namhyung Kim <namhyung@...il.com>, Stephane Eranian <eranian@...gle.com> Subject: Re: [PATCH 09/44] perf session: Add instruction tracing options On 21/04/15 17:50, Arnaldo Carvalho de Melo wrote: > Em Thu, Apr 09, 2015 at 06:53:49PM +0300, Adrian Hunter escreveu: > >> It is assumed that AUX area decoding will synthesize events for >> consumption by other tools. At this time, the main use of AUX area >> tracing will be to capture instruction trace (aka processor trace) >> data. The nature of instruction tracing suggests the initial >> inclusion of options for "instructions" and "branches" events, but >> more could be added as needed. > >> +++ b/tools/perf/util/auxtrace.c >> @@ -37,6 +37,7 @@ >> >> #include "event.h" >> #include "debug.h" >> +#include "parse-options.h" >> >> int auxtrace_mmap__mmap(struct auxtrace_mmap *mm, >> struct auxtrace_mmap_params *mp, >> @@ -200,6 +201,136 @@ out_free: >> return err; >> } >> >> +#define PERF_ITRACE_DEFAULT_PERIOD_TYPE PERF_ITRACE_PERIOD_NANOSECS >> +#define PERF_ITRACE_DEFAULT_PERIOD 100000 >> +#define PERF_ITRACE_DEFAULT_CALLCHAIN_SZ 16 >> +#define PERF_ITRACE_MAX_CALLCHAIN_SZ 1024 >> + >> +void itrace_synth_opts__set_default(struct itrace_synth_opts *synth_opts) >> +{ >> + synth_opts->instructions = true; >> + synth_opts->branches = true; >> + synth_opts->errors = true; >> + synth_opts->period_type = PERF_ITRACE_DEFAULT_PERIOD_TYPE; >> + synth_opts->period = PERF_ITRACE_DEFAULT_PERIOD; >> + synth_opts->callchain_sz = PERF_ITRACE_DEFAULT_CALLCHAIN_SZ; >> +} >> + >> +int itrace_parse_synth_opts(const struct option *opt, const char *str, >> + int unset) >> +{ >> + struct itrace_synth_opts *synth_opts = opt->value; >> + const char *p; >> + char *endptr; >> + >> + synth_opts->set = true; >> + >> + if (unset) { >> + synth_opts->dont_decode = true; >> + return 0; >> + } >> + >> + if (!str) { >> + itrace_synth_opts__set_default(synth_opts); >> + return 0; >> + } >> + >> + for (p = str; *p;) { >> + switch (*p++) { >> + case 'i': >> + synth_opts->instructions = true; > > Is this documented anywhere? I.e. examples for setting up this synth > ops? They are documented for each tool that uses them: Documentation/perf-script.txt Documentation/perf-record.txt and also in: Documentation/intel-pt.txt -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@...r.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists