Loading tools/perf/Documentation/perf-buildid-cache.txt +2 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ perf-buildid-cache - Manage build-id cache. SYNOPSIS -------- [verse] 'perf buildid-list <options>' 'perf buildid-cache <options>' DESCRIPTION ----------- Loading @@ -30,4 +30,4 @@ OPTIONS SEE ALSO -------- linkperf:perf-record[1], linkperf:perf-report[1] linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-buildid-list[1] tools/perf/Documentation/perf-inject.txt 0 → 100644 +35 −0 Original line number Diff line number Diff line perf-inject(1) ============== NAME ---- perf-inject - Filter to augment the events stream with additional information SYNOPSIS -------- [verse] 'perf inject <options>' DESCRIPTION ----------- perf-inject reads a perf-record event stream and repipes it to stdout. At any point the processing code can inject other events into the event stream - in this case build-ids (-b option) are read and injected as needed into the event stream. Build-ids are just the first user of perf-inject - potentially anything that needs userspace processing to augment the events stream with additional information could make use of this facility. OPTIONS ------- -b:: --build-ids=:: Inject build-ids into the output stream -v:: --verbose:: Be more verbose. SEE ALSO -------- linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-archive[1] tools/perf/builtin-inject.c +1 −1 Original line number Diff line number Diff line Loading @@ -204,7 +204,7 @@ static const char * const report_usage[] = { }; static const struct option options[] = { OPT_BOOLEAN('b', "inject build-ids", &inject_build_ids, OPT_BOOLEAN('b', "build-ids", &inject_build_ids, "Inject build-ids into the output stream"), OPT_INCR('v', "verbose", &verbose, "be more verbose (show build ids, etc)"), Loading tools/perf/builtin-record.c +21 −14 Original line number Diff line number Diff line Loading @@ -560,11 +560,12 @@ static int __cmd_record(int argc, const char **argv) return err; } if (raw_samples) { if (raw_samples && have_tracepoints(attrs, nr_counters)) { perf_header__set_feat(&session->header, HEADER_TRACE_INFO); } else { for (i = 0; i < nr_counters; i++) { if (attrs[i].sample_type & PERF_SAMPLE_RAW) { if (attrs[i].sample_type & PERF_SAMPLE_RAW && attrs[i].type == PERF_TYPE_TRACEPOINT) { perf_header__set_feat(&session->header, HEADER_TRACE_INFO); break; } Loading Loading @@ -662,20 +663,26 @@ static int __cmd_record(int argc, const char **argv) return err; } if (have_tracepoints(attrs, nr_counters)) { /* * FIXME err <= 0 here actually means that * there were no tracepoints so its not really * an error, just that we don't need to * synthesize anything. We really have to * return this more properly and also * propagate errors that now are calling die() */ err = event__synthesize_tracing_data(output, attrs, nr_counters, process_synthesized_event, session); /* * FIXME err <= 0 here actually means that there were no tracepoints * so its not really an error, just that we don't need to synthesize * anything. * We really have to return this more properly and also propagate * errors that now are calling die() */ if (err > 0) if (err <= 0) { pr_err("Couldn't record tracing data.\n"); return err; } advance_output(err); } } machine = perf_session__find_host_machine(session); if (!machine) { Loading tools/perf/command-list.txt +1 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ perf-bench mainporcelain common perf-buildid-cache mainporcelain common perf-buildid-list mainporcelain common perf-diff mainporcelain common perf-inject mainporcelain common perf-list mainporcelain common perf-sched mainporcelain common perf-record mainporcelain common Loading Loading
tools/perf/Documentation/perf-buildid-cache.txt +2 −2 Original line number Diff line number Diff line Loading @@ -8,7 +8,7 @@ perf-buildid-cache - Manage build-id cache. SYNOPSIS -------- [verse] 'perf buildid-list <options>' 'perf buildid-cache <options>' DESCRIPTION ----------- Loading @@ -30,4 +30,4 @@ OPTIONS SEE ALSO -------- linkperf:perf-record[1], linkperf:perf-report[1] linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-buildid-list[1]
tools/perf/Documentation/perf-inject.txt 0 → 100644 +35 −0 Original line number Diff line number Diff line perf-inject(1) ============== NAME ---- perf-inject - Filter to augment the events stream with additional information SYNOPSIS -------- [verse] 'perf inject <options>' DESCRIPTION ----------- perf-inject reads a perf-record event stream and repipes it to stdout. At any point the processing code can inject other events into the event stream - in this case build-ids (-b option) are read and injected as needed into the event stream. Build-ids are just the first user of perf-inject - potentially anything that needs userspace processing to augment the events stream with additional information could make use of this facility. OPTIONS ------- -b:: --build-ids=:: Inject build-ids into the output stream -v:: --verbose:: Be more verbose. SEE ALSO -------- linkperf:perf-record[1], linkperf:perf-report[1], linkperf:perf-archive[1]
tools/perf/builtin-inject.c +1 −1 Original line number Diff line number Diff line Loading @@ -204,7 +204,7 @@ static const char * const report_usage[] = { }; static const struct option options[] = { OPT_BOOLEAN('b', "inject build-ids", &inject_build_ids, OPT_BOOLEAN('b', "build-ids", &inject_build_ids, "Inject build-ids into the output stream"), OPT_INCR('v', "verbose", &verbose, "be more verbose (show build ids, etc)"), Loading
tools/perf/builtin-record.c +21 −14 Original line number Diff line number Diff line Loading @@ -560,11 +560,12 @@ static int __cmd_record(int argc, const char **argv) return err; } if (raw_samples) { if (raw_samples && have_tracepoints(attrs, nr_counters)) { perf_header__set_feat(&session->header, HEADER_TRACE_INFO); } else { for (i = 0; i < nr_counters; i++) { if (attrs[i].sample_type & PERF_SAMPLE_RAW) { if (attrs[i].sample_type & PERF_SAMPLE_RAW && attrs[i].type == PERF_TYPE_TRACEPOINT) { perf_header__set_feat(&session->header, HEADER_TRACE_INFO); break; } Loading Loading @@ -662,20 +663,26 @@ static int __cmd_record(int argc, const char **argv) return err; } if (have_tracepoints(attrs, nr_counters)) { /* * FIXME err <= 0 here actually means that * there were no tracepoints so its not really * an error, just that we don't need to * synthesize anything. We really have to * return this more properly and also * propagate errors that now are calling die() */ err = event__synthesize_tracing_data(output, attrs, nr_counters, process_synthesized_event, session); /* * FIXME err <= 0 here actually means that there were no tracepoints * so its not really an error, just that we don't need to synthesize * anything. * We really have to return this more properly and also propagate * errors that now are calling die() */ if (err > 0) if (err <= 0) { pr_err("Couldn't record tracing data.\n"); return err; } advance_output(err); } } machine = perf_session__find_host_machine(session); if (!machine) { Loading
tools/perf/command-list.txt +1 −0 Original line number Diff line number Diff line Loading @@ -8,6 +8,7 @@ perf-bench mainporcelain common perf-buildid-cache mainporcelain common perf-buildid-list mainporcelain common perf-diff mainporcelain common perf-inject mainporcelain common perf-list mainporcelain common perf-sched mainporcelain common perf-record mainporcelain common Loading