|
@@ -4293,6 +4293,9 @@ static void perf_mmap_open(struct vm_area_struct *vma)
|
|
|
|
|
|
atomic_inc(&event->mmap_count);
|
|
atomic_inc(&event->mmap_count);
|
|
atomic_inc(&event->rb->mmap_count);
|
|
atomic_inc(&event->rb->mmap_count);
|
|
|
|
+
|
|
|
|
+ if (event->pmu->event_mapped)
|
|
|
|
+ event->pmu->event_mapped(event);
|
|
}
|
|
}
|
|
|
|
|
|
/*
|
|
/*
|
|
@@ -4312,6 +4315,9 @@ static void perf_mmap_close(struct vm_area_struct *vma)
|
|
int mmap_locked = rb->mmap_locked;
|
|
int mmap_locked = rb->mmap_locked;
|
|
unsigned long size = perf_data_size(rb);
|
|
unsigned long size = perf_data_size(rb);
|
|
|
|
|
|
|
|
+ if (event->pmu->event_unmapped)
|
|
|
|
+ event->pmu->event_unmapped(event);
|
|
|
|
+
|
|
atomic_dec(&rb->mmap_count);
|
|
atomic_dec(&rb->mmap_count);
|
|
|
|
|
|
if (!atomic_dec_and_mutex_lock(&event->mmap_count, &event->mmap_mutex))
|
|
if (!atomic_dec_and_mutex_lock(&event->mmap_count, &event->mmap_mutex))
|
|
@@ -4513,6 +4519,9 @@ unlock:
|
|
vma->vm_flags |= VM_DONTCOPY | VM_DONTEXPAND | VM_DONTDUMP;
|
|
vma->vm_flags |= VM_DONTCOPY | VM_DONTEXPAND | VM_DONTDUMP;
|
|
vma->vm_ops = &perf_mmap_vmops;
|
|
vma->vm_ops = &perf_mmap_vmops;
|
|
|
|
|
|
|
|
+ if (event->pmu->event_mapped)
|
|
|
|
+ event->pmu->event_mapped(event);
|
|
|
|
+
|
|
return ret;
|
|
return ret;
|
|
}
|
|
}
|
|
|
|
|