Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1665111
| From | Jiri Olsa <jolsa@redhat.com> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | Re: [PATCH v4 15/16] perf tools: add feature header record to pipe-mode |
| Date | 2017-06-13 21:00 +0200 |
| Message-ID | <tRZcK-380-13@gated-at.bofh.it> (permalink) |
| References | <tRLMt-3kB-3@gated-at.bofh.it> <tRLMt-3kB-5@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
On Mon, Jun 12, 2017 at 09:29:31PM -0700, David Carrillo-Cisneros wrote:
SNIP
> +
> + for_each_set_bit(feat, header->adds_features, HEADER_FEAT_BITS) {
> + if (!feat_ops[feat].synthesize) {
> + pr_debug("No record header feature for header :%d\n", feat);
> + continue;
> + }
> +
> + ff.offset = sizeof(*fe);
> +
> + ret = feat_ops[feat].write(&ff, evlist);
> + if (ret || ff.offset <= (ssize_t)sizeof(*fe)) {
> + pr_debug("Error writing feature\n");
> + continue;
> + }
> +
> + /* ff.buf may have changed due to realloc in do_write() */
> + fe = ff.buf;
> + memset(fe, 0, sizeof(*fe));
> +
> + fe->feat_id = feat;
> + fe->header.type = PERF_RECORD_HEADER_FEATURE;
> + fe->header.size = ff.offset;
> +
> + ret = process(tool, ff.buf, NULL, NULL);
> + if (ret)
leaking ff.buf
jirka
> + return ret;
> + }
> + free(ff.buf);
> + return 0;
> +}
> +
Back to linux.kernel | Previous | Next — Previous in thread | Find similar | Unroll thread
[PATCH v4 15/16] perf tools: add feature header record to pipe-mode David Carrillo-Cisneros <davidcc@google.com> - 2017-06-13 06:40 +0200 Re: [PATCH v4 15/16] perf tools: add feature header record to pipe-mode Jiri Olsa <jolsa@redhat.com> - 2017-06-13 21:00 +0200 Re: [PATCH v4 15/16] perf tools: add feature header record to pipe-mode Jiri Olsa <jolsa@redhat.com> - 2017-06-13 21:00 +0200
csiph-web