All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Wang Nan <wangnan0@huawei.com>
Cc: acme@kernel.org, lizefan@huawei.com,
	linux-kernel@vger.kernel.org, pi3orama@163.com,
	He Kuang <hekuang@huawei.com>,
	Arnaldo Carvalho de Melo <acme@redhat.com>,
	Jiri Olsa <jolsa@kernel.org>,
	Masami Hiramatsu <mhiramat@kernel.org>,
	Namhyung Kim <namhyung@kernel.org>,
	Nilay Vaish <nilayvaish@gmail.com>
Subject: Re: [PATCH v15 09/12] perf record: Read from overwritable ring buffer
Date: Wed, 13 Jul 2016 16:07:01 +0200	[thread overview]
Message-ID: <20160713140701.GD31742@krava> (raw)
In-Reply-To: <1468317612-11598-10-git-send-email-wangnan0@huawei.com>

On Tue, Jul 12, 2016 at 10:00:09AM +0000, Wang Nan wrote:

SNIP

> @@ -131,9 +156,10 @@ rb_find_range(void *data, int mask, u64 head, u64 old,
>  	return backward_rb_find_range(data, mask, head, start, end);
>  }
>  
> -static int record__mmap_read(struct record *rec, struct perf_evlist *evlist, int idx)
> +static int
> +record__mmap_read(struct record *rec, struct perf_mmap *md,
> +		  bool overwrite, bool backward)
>  {
> -	struct perf_mmap *md = &evlist->mmap[idx];
>  	u64 head = perf_mmap__read_head(md);
>  	u64 old = md->prev;
>  	u64 end = head, start = old;
> @@ -143,7 +169,7 @@ static int record__mmap_read(struct record *rec, struct perf_evlist *evlist, int
>  	int rc = 0;
>  
>  	if (rb_find_range(data, md->mask, head,
> -			  old, &start, &end, false))
> +			  old, &start, &end, backward))
>  		return -1;
>  
>  	if (start == end)
> @@ -156,7 +182,7 @@ static int record__mmap_read(struct record *rec, struct perf_evlist *evlist, int
>  		WARN_ONCE(1, "failed to keep up with mmap data. (warn only once)\n");
>  
>  		md->prev = head;
> -		perf_evlist__mmap_consume(evlist, idx);
> +		perf_mmap__consume(md, overwrite || backward);
>  		return 0;
>  	}
>  
> @@ -181,7 +207,7 @@ static int record__mmap_read(struct record *rec, struct perf_evlist *evlist, int
>  	}
>  
>  	md->prev = head;
> -	perf_evlist__mmap_consume(evlist, idx);
> +	perf_mmap__consume(md, overwrite || backward);
>  out:
>  	return rc;
>  }
> @@ -341,6 +367,75 @@ int auxtrace_record__snapshot_start(struct auxtrace_record *itr __maybe_unused)

could above hunks be moved into separate patch?

jirka

  parent reply	other threads:[~2016-07-13 14:07 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-12 10:00 [PATCH v15 00/12] perf tools: Support overwritable ring buffer Wang Nan
2016-07-12 10:00 ` [PATCH v15 01/12] perf tools: Drop redundant evsel->overwrite indicator Wang Nan
2016-07-12 10:00 ` [PATCH v15 02/12] tools lib fd array: Allow associating a pointer cookie with each entry Wang Nan
2016-07-12 10:00 ` [PATCH v15 03/12] perf tools: Update perf evlist mmap related APIs and helpers Wang Nan
2016-07-13 14:06   ` Jiri Olsa
2016-07-14  1:58     ` Wangnan (F)
2016-07-12 10:00 ` [PATCH v15 04/12] perf tools: Record mmap cookie into fdarray private field Wang Nan
2016-07-12 10:00 ` [PATCH v15 05/12] perf tools: Extract common code in mmap failure processing Wang Nan
2016-07-12 10:00 ` [PATCH v15 06/12] perf tools: Alloc backward_mmap array for evlist Wang Nan
2016-07-12 10:00 ` [PATCH v15 07/12] perf tools: Map backward events to backward_mmap Wang Nan
2016-07-13 14:06   ` Jiri Olsa
2016-07-12 10:00 ` [PATCH v15 08/12] perf tools: Drop evlist->backward Wang Nan
2016-07-12 10:00 ` [PATCH v15 09/12] perf record: Read from overwritable ring buffer Wang Nan
2016-07-13 14:06   ` Jiri Olsa
2016-07-13 14:07   ` Jiri Olsa [this message]
2016-07-13 14:07   ` Jiri Olsa
2016-07-12 10:00 ` [PATCH v15 10/12] perf tools: Enable overwrite settings Wang Nan
2016-07-12 10:00 ` [PATCH v15 11/12] perf tools: Don't warn about out of order event if write_backward is used Wang Nan
2016-07-12 10:00 ` [PATCH v15 12/12] perf tools: Add --tail-synthesize option Wang Nan

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=20160713140701.GD31742@krava \
    --to=jolsa@redhat.com \
    --cc=acme@kernel.org \
    --cc=acme@redhat.com \
    --cc=hekuang@huawei.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=lizefan@huawei.com \
    --cc=mhiramat@kernel.org \
    --cc=namhyung@kernel.org \
    --cc=nilayvaish@gmail.com \
    --cc=pi3orama@163.com \
    --cc=wangnan0@huawei.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.