Messages in this thread | | | Subject | Re: [PATCHv4] perf x86_64: Fix rsp register for system call fast path | From | Peter Zijlstra <> | Date | Wed, 03 Oct 2012 15:22:17 +0200 |
| |
On Wed, 2012-10-03 at 15:13 +0200, Jiri Olsa wrote: > @@ -1190,8 +1191,8 @@ static inline void perf_sample_data_init(struct > perf_sample_data *data, > data->raw = NULL; > data->br_stack = NULL; > data->period = period; > - data->regs_user.abi = PERF_SAMPLE_REGS_ABI_NONE; > - data->regs_user.regs = NULL; > + /* Sets abi to PERF_SAMPLE_REGS_ABI_NONE. */ > + memset(&data->regs_user, 0, sizeof(data->regs_user)); > data->stack_user_size = 0; > }
Hmm, this will slow down all events, regardless of whether they use any of that stuff or not. Since the one user actually does something like:
data->regs_user = *pt_regs;
except it does a memcpy() for some obscure reason, it really doesn't matter what is in there when uninitialized, right?
| |