lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20140914132423.GF1731@krava.redhat.com>
Date:	Sun, 14 Sep 2014 15:24:23 +0200
From:	Jiri Olsa <jolsa@...hat.com>
To:	Alexander Yarygin <yarygin@...ux.vnet.ibm.com>
Cc:	linux-kernel@...r.kernel.org,
	Arnaldo Carvalho de Melo <acme@...nel.org>,
	Christian Borntraeger <borntraeger@...ibm.com>,
	David Ahern <dsahern@...il.com>,
	Ingo Molnar <mingo@...nel.org>, Jiri Olsa <jolsa@...nel.org>,
	Paul Mackerras <paulus@...ba.org>,
	Peter Zijlstra <a.p.zijlstra@...llo.nl>
Subject: Re: [PATCH RFC] perf kvm stat live: cache mmap()ed events

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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ