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]
Date:	Fri, 23 Jan 2015 09:44:51 +0100
From:	Peter Zijlstra <peterz@...radead.org>
To:	Shaohua Li <shli@...com>
Cc:	linux-kernel@...r.kernel.org, Kernel-team@...com,
	Andy Lutomirski <luto@...capital.net>,
	Ingo Molnar <mingo@...nel.org>
Subject: Re: [RFC 2/2] perf: update userspace page info for software event

On Thu, Jan 22, 2015 at 01:09:02PM -0800, Shaohua Li wrote:
> ---
>  kernel/events/core.c | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/kernel/events/core.c b/kernel/events/core.c
> index 4edde3e..4221240 100644
> --- a/kernel/events/core.c
> +++ b/kernel/events/core.c
> @@ -5950,6 +5950,7 @@ static int perf_swevent_add(struct perf_event *event, int flags)
>  	}
>  
>  	hlist_add_head_rcu(&event->hlist_entry, head);
> +	perf_event_update_userpage(event);
>  
>  	return 0;
>  }
> @@ -6419,6 +6420,7 @@ static int cpu_clock_event_add(struct perf_event *event, int flags)
>  {
>  	if (flags & PERF_EF_START)
>  		cpu_clock_event_start(event, flags);
> +	perf_event_update_userpage(event);
>  
>  	return 0;
>  }
> @@ -6493,6 +6495,7 @@ static int task_clock_event_add(struct perf_event *event, int flags)
>  {
>  	if (flags & PERF_EF_START)
>  		task_clock_event_start(event, flags);
> +	perf_event_update_userpage(event);
>  
>  	return 0;
>  }

How about the one I sent; which adds it to {start,stop} instead of add?
{start,stop} is the right place to add them, although this add might be
sufficient for your use case.
--
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