Prev: [2.6.34, patch] i915: fix lock imbalance on error path...
Next: [PATCH] KEYS: Return more accurate error codes
From: Peter Zijlstra on 17 May 2010 09:30 On Fri, 2010-05-07 at 10:05 +0100, Eric B Munson wrote: > This patch splits tracking of executable and non-executable mmaps. > Executable mmaps are tracked normally and non-executable are > tracked when --data is used. > > Signed-off-by: Anton Blanchard <anton(a)samba.org> > > Updated code for stable perf ABI > Signed-off-by: Eric B Munson <ebmunson(a)us.ibm.com> > +++ b/include/linux/perf_event.h > @@ -197,6 +197,7 @@ struct perf_event_attr { > exclude_hv : 1, /* ditto hypervisor */ > exclude_idle : 1, /* don't count when idle */ > mmap : 1, /* include mmap data */ > + mmap_exec : 1, /* include exec mmap data*/ > comm : 1, /* include comm data */ > freq : 1, /* use freq, not period */ > inherit_stat : 1, /* per task counts */ You cannot add a field in the middle, that breaks ABI. > -static inline void perf_event_mmap(struct vm_area_struct *vma) > -{ > - if (vma->vm_flags & VM_EXEC) > - __perf_event_mmap(vma); > -} Also, the current behaviour of perf_event_attr::mmap() is to trace VM_EXEC maps only, apps relying on that will be broken after this patch because they'd have to set mmap_exec. If you want to do this, you'll have to add mmap_data (to the tail of the bitfield) and have that add !VM_EXEC mmap() tracing. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
From: Eric B Munson on 17 May 2010 09:50 On Mon, 17 May 2010, Peter Zijlstra wrote: > On Fri, 2010-05-07 at 10:05 +0100, Eric B Munson wrote: > > This patch splits tracking of executable and non-executable mmaps. > > Executable mmaps are tracked normally and non-executable are > > tracked when --data is used. > > > > Signed-off-by: Anton Blanchard <anton(a)samba.org> > > > > Updated code for stable perf ABI > > Signed-off-by: Eric B Munson <ebmunson(a)us.ibm.com> > > > +++ b/include/linux/perf_event.h > > @@ -197,6 +197,7 @@ struct perf_event_attr { > > exclude_hv : 1, /* ditto hypervisor */ > > exclude_idle : 1, /* don't count when idle */ > > mmap : 1, /* include mmap data */ > > + mmap_exec : 1, /* include exec mmap data*/ > > comm : 1, /* include comm data */ > > freq : 1, /* use freq, not period */ > > inherit_stat : 1, /* per task counts */ > > You cannot add a field in the middle, that breaks ABI. > > > -static inline void perf_event_mmap(struct vm_area_struct *vma) > > -{ > > - if (vma->vm_flags & VM_EXEC) > > - __perf_event_mmap(vma); > > -} > > Also, the current behaviour of perf_event_attr::mmap() is to trace > VM_EXEC maps only, apps relying on that will be broken after this patch > because they'd have to set mmap_exec. > > If you want to do this, you'll have to add mmap_data (to the tail of the > bitfield) and have that add !VM_EXEC mmap() tracing. > Thanks, I will get right on the changes. -- Eric B Munson IBM Linux Technology Center ebmunson(a)us.ibm.com
From: Peter Zijlstra on 25 May 2010 05:50
On Tue, 2010-05-18 at 15:30 +0100, Eric B Munson wrote: > + mmap_data : 1. /* non-exec mmap data */ Things compile better if you use a ',' there :-) anyway, fixed it up and will continue the compile.. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo(a)vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/ |