Re: [PATCH v13 5/8] perf record: Read from overwritable ring buffer

From: Jiri Olsa
Date: Wed Jul 06 2016 - 07:37:20 EST


On Mon, Jul 04, 2016 at 06:20:06AM +0000, Wang Nan wrote:

SNIP

> @@ -463,6 +488,7 @@ try_again:
>
> session->evlist = evlist;
> perf_session__set_id_hdr_size(session);
> + rec->overwrite_evt_state = OVERWRITE_EVT_RUNNING;
> out:
> return rc;
> }
> @@ -543,6 +569,79 @@ static struct perf_event_header finished_round_event = {
> .type = PERF_RECORD_FINISHED_ROUND,
> };
>
> +static void
> +record__toggle_overwrite_evsels(struct record *rec,
> + enum overwrite_evt_state state)
> +{

record__toggle_overwrite_evlist might be better name

jirka