mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Jiri Olsa <jolsa@redhat.com>
To: Alexander Yarygin <yarygin@linux.vnet.ibm.com>
Cc: linux-kernel@vger.kernel.org,
	Arnaldo Carvalho de Melo <acme@kernel.org>,
	Christian Borntraeger <borntraeger@de.ibm.com>,
	David Ahern <dsahern@gmail.com>, Ingo Molnar <mingo@kernel.org>,
	Jiri Olsa <jolsa@kernel.org>, Paul Mackerras <paulus@samba.org>,
	Peter Zijlstra <a.p.zijlstra@chello.nl>
Subject: Re: [PATCH RFC] perf kvm stat live: cache mmap()ed events
Date: Sun, 14 Sep 2014 15:24:23 +0200	[thread overview]
Message-ID: <20140914132423.GF1731@krava.redhat.com> (raw)
In-Reply-To: <1410539263-25857-1-git-send-email-yarygin@linux.vnet.ibm.com>

On Fri, Sep 12, 2014 at 08:27:43PM +0400, Alexander Yarygin wrote:

SNIP

> +
> +	list_for_each_safe(p, p2, &cache->list) {
> +		struct events_cache *entry;
> +
> +		entry = list_entry(p, struct events_cache, list);
> +
> +		if (&entry->event == event) {
> +			list_del(&entry->list);
> +			free(entry);
> +
> +			break;
> +		}
> +	}
> +}
> +
> +static void clear_events_cache(struct events_cache *cache)
> +{
> +	struct list_head *p, *p2;
> +
> +	list_for_each_safe(p, p2, &cache->list) {
> +		struct event_cache *entry;

s/event_cache/events_cache/ ? does not compile for me otherwise

> +
> +		entry = list_entry(p, struct events_cache, list);
> +		list_del(&entry->list);
> +		free(entry);
> +	}
> +	free(cache);
> +}

SNIP

>  }
> 
>  static int cpu_isa_config(struct perf_kvm_stat *kvm)
> @@ -732,15 +800,15 @@ static s64 perf_kvm__mmap_read_idx(struct perf_kvm_stat *kvm, int idx,
>  			return -1;
>  		}
> 
> -		err = perf_session_queue_event(kvm->session, event, &sample, 0);
> -		/*
> -		 * FIXME: Here we can't consume the event, as perf_session_queue_event will
> -		 *        point to it, and it'll get possibly overwritten by the kernel.
> -		 */
> +		event = alloc_event_cache(kvm->cache, event);
> +
>  		perf_evlist__mmap_consume(kvm->evlist, idx);
> 
> +		err = perf_session_queue_event(kvm->session, event, &sample, 0);

got conflict here, this got recently changed.. needs to have tool param:

-               err = perf_session_queue_event(kvm->session, event, &sample, 0);
+               err = perf_session_queue_event(kvm->session, event, &kvm->tool, &sample, 0);

jirka

  reply	other threads:[~2014-09-14 13:25 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-09-12 16:27 Alexander Yarygin
2014-09-14 13:24 ` Jiri Olsa [this message]
2014-09-14 15:39 ` David Ahern
2014-09-15 12:57   ` Alexander Yarygin
2014-09-15 14:23     ` David Ahern
2014-09-15 18:45     ` 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=20140914132423.GF1731@krava.redhat.com \
    --to=jolsa@redhat.com \
    --cc=a.p.zijlstra@chello.nl \
    --cc=acme@kernel.org \
    --cc=borntraeger@de.ibm.com \
    --cc=dsahern@gmail.com \
    --cc=jolsa@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mingo@kernel.org \
    --cc=paulus@samba.org \
    --cc=yarygin@linux.vnet.ibm.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

Powered by JetHome