From: Adrian Hunter <adrian.hunter@intel.com>
To: Jiri Olsa <jolsa@redhat.com>
Cc: Arnaldo Carvalho de Melo <acme@kernel.org>, linux-kernel@vger.kernel.org
Subject: Re: [PATCH 5/5] perf record: Put a copy of kcore into the perf.data directory
Date: Mon, 7 Oct 2019 15:06:59 +0300 [thread overview]
Message-ID: <2298237b-f218-18d9-4fb5-33fc0d3a4664@intel.com> (raw)
In-Reply-To: <20191007112034.GE6919@krava>
On 7/10/19 2:20 PM, Jiri Olsa wrote:
> On Fri, Oct 04, 2019 at 11:31:21AM +0300, Adrian Hunter wrote:
>
> SNIP
>
>> +}
>> +
>> static int record__mmap_evlist(struct record *rec,
>> struct evlist *evlist)
>> {
>> @@ -1383,6 +1417,12 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
>> session->header.env.comp_type = PERF_COMP_ZSTD;
>> session->header.env.comp_level = rec->opts.comp_level;
>>
>> + if (rec->opts.kcore &&
>> + !record__kcore_readable(&session->machines.host)) {
>> + pr_err("ERROR: kcore is not readable.\n");
>> + return -1;
>> + }
>> +
>
> is there any reason why this change is not merged with the change below?
It seemed better to do the validation before opening all the events.
>
>
>> record__init_features(rec);
>>
>> if (rec->opts.use_clockid && rec->opts.clockid_res_ns)
>> @@ -1414,6 +1454,14 @@ static int __cmd_record(struct record *rec, int argc, const char **argv)
>> }
>> session->header.env.comp_mmap_len = session->evlist->core.mmap_len;
>>
>> + if (rec->opts.kcore) {
>> + err = record__kcore_copy(&session->machines.host, data);
>> + if (err) {
>> + pr_err("ERROR: Failed to copy kcore\n");
>> + goto out_child;
>> + }
>> + }
>> +
>
> thanks,
> jirka
>
next prev parent reply other threads:[~2019-10-07 12:08 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-04 8:31 [PATCH 0/5] " Adrian Hunter
2019-10-04 8:31 ` [PATCH 1/5] perf data: Correctly identify directory data files Adrian Hunter
2019-11-12 11:18 ` [tip: perf/core] " tip-bot2 for Adrian Hunter
2019-10-04 8:31 ` [PATCH 2/5] perf data: Move perf_dir_version into data.h Adrian Hunter
2019-11-12 11:18 ` [tip: perf/core] " tip-bot2 for Adrian Hunter
2019-10-04 8:31 ` [PATCH 3/5] perf data: Rename directory "header" file to "data" Adrian Hunter
2019-11-12 11:18 ` [tip: perf/core] " tip-bot2 for Adrian Hunter
2019-10-04 8:31 ` [PATCH 4/5] perf tools: Support single perf.data file directory Adrian Hunter
2019-10-07 11:20 ` Jiri Olsa
2019-10-07 12:06 ` Adrian Hunter
2019-10-21 12:42 ` Adrian Hunter
2019-10-21 13:46 ` Arnaldo Carvalho de Melo
2019-10-21 13:52 ` Jiri Olsa
2019-10-21 14:03 ` Arnaldo Carvalho de Melo
2019-11-12 11:18 ` [tip: perf/core] perf session: Fix indent in perf_session__new()" tip-bot2 for Jiri Olsa
2019-11-12 11:18 ` [tip: perf/core] perf data: Support single perf.data file directory tip-bot2 for Adrian Hunter
2019-10-04 8:31 ` [PATCH 5/5] perf record: Put a copy of kcore into the perf.data directory Adrian Hunter
2019-10-07 11:20 ` Jiri Olsa
2019-10-07 12:06 ` Adrian Hunter [this message]
2019-10-07 11:20 ` Jiri Olsa
2019-10-07 12:14 ` Adrian Hunter
2019-11-12 11:18 ` [tip: perf/core] " tip-bot2 for Adrian Hunter
2019-10-07 12:55 ` [PATCH 0/5] " Jiri Olsa
2019-10-21 14:36 ` Arnaldo Carvalho de Melo
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2298237b-f218-18d9-4fb5-33fc0d3a4664@intel.com \
--to=adrian.hunter@intel.com \
--cc=acme@kernel.org \
--cc=jolsa@redhat.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®