Function report |
Source Code:kernel\events\core.c |
Create Date:2022-07-28 13:35:54 |
| Last Modify:2022-05-20 07:50:19 | Copyright©Brick |
| home page | Tree |
| Annotation kernel can get tool activity | Download SCCT | Chinese |
Name:A buffer can be mmap()ed multiple times; either directly through the same* event, or through other events by use of perf_event_set_output().* In order to undo the VM accounting done by perf_mmap() we need to destroy
Proto:static void perf_mmap_close(struct vm_area_struct *vma)
Type:void
Parameter:
| Type | Parameter | Name |
|---|---|---|
| struct vm_area_struct * | vma |
| 5674 | event = private_data |
| 5676 | rb = ring_buffer_get(event) |
| 5678 | mmap_locked = mmap_locked |
| 5679 | size = perf_data_size(rb) |
| 5681 | If event_unmapped Then event_unmapped(event, The address space we belong to. ) |
| 5697 | perf_pmu_output_stop(event) |
| 5700 | atomic_long_sub(aux_nr_pages - aux_mmap_locked, & locked_vm) |
| 5701 | atomic64_sub(aux_mmap_locked, & pinned_vm) |
| 5704 | rb_free_aux(rb) |
| 5710 | atomic_dec( & mmap_count) |
| 5715 | ring_buffer_attach(event, NULL) |
| 5719 | If atomic_read( & mmap_count) Then Go to out_put |
| 5727 | again : |
| 5730 | If Not atomic_long_inc_not_zero( & refcount) Then |
| 5735 | Continue |
| 5739 | mutex_lock( & mmap_mutex) |
| 5750 | If rb == rb Then ring_buffer_attach(event, NULL) |
| 5760 | Go to again |
| 5773 | atomic_long_sub((size >> PAGE_SHIFT determines the page size ) + 1 - mmap_locked, & locked_vm) |
| 5775 | atomic64_sub(mmap_locked, & pinned_vm) |
| 5778 | out_put : |
| 5779 | ring_buffer_put(rb) |
| Source code conversion tool public plug-in interface | X |
|---|---|
| Support c/c++/esqlc/java Oracle/Informix/Mysql Plug-in can realize: logical Report Code generation and batch code conversion |