lkml.org 
[lkml]   [2017]   [Nov]   [2]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH v2 1/5] perf/core: add PERF_RECORD_SAMPLE_SKID_IP record type
On Thu, Nov 02, 2017 at 11:15:55AM -0700, Stephane Eranian wrote:

> diff --git a/include/linux/perf_event.h b/include/linux/perf_event.h
> index 874b71a70058..772530501025 100644
> --- a/include/linux/perf_event.h
> +++ b/include/linux/perf_event.h
> @@ -917,6 +917,7 @@ struct perf_sample_data {
> u64 stack_user_size;
>
> u64 phys_addr;
> + u64 skid_ip;
> } ____cacheline_aligned;
>
> /* default value for data source */
> @@ -937,6 +938,7 @@ static inline void perf_sample_data_init(struct perf_sample_data *data,
> data->weight = 0;
> data->data_src.val = PERF_MEM_NA;
> data->txn = 0;
> + data->skid_ip = 0; /* mark as uinitialized */
> }

I keep forgetting to write the comment explaining how this function only
touches a single cacheline; you just wrecked that :/

\
 
 \ /
  Last update: 2017-11-02 20:00    [W:0.051 / U:1.196 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site