diff options
author | Igor Nabirushkin <inabirushkin@nvidia.com> | 2014-01-27 03:13:33 +0400 |
---|---|---|
committer | Bharat Nihalani <bnihalani@nvidia.com> | 2014-02-07 06:11:38 -0800 |
commit | 4a37f8b0dbc1763f8a992d2c126258ea3190e529 (patch) | |
tree | 5507527b3ec1875d4b79ca49b241ecc03c955ed6 /mm | |
parent | de7bfbdf663e5ca00ba44e3575d5deaddbfea4cd (diff) |
misc: tegra-profiler: use mmap calls
Tegra Profiler: add mmap calls
Bug 1447662
Change-Id: I96614ab3c320fd028cf861ea970b5199bdcae1c7
Signed-off-by: Igor Nabirushkin <inabirushkin@nvidia.com>
Reviewed-on: http://git-master/r/360152
Reviewed-by: Bharat Nihalani <bnihalani@nvidia.com>
Tested-by: Bharat Nihalani <bnihalani@nvidia.com>
Diffstat (limited to 'mm')
-rw-r--r-- | mm/mmap.c | 7 | ||||
-rw-r--r-- | mm/mprotect.c | 2 |
2 files changed, 9 insertions, 0 deletions
diff --git a/mm/mmap.c b/mm/mmap.c index 9aa554b7e620..93cbba8e0047 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -36,6 +36,7 @@ #include <linux/sched/sysctl.h> #include <linux/notifier.h> #include <linux/memory.h> +#include <linux/tegra_profiler.h> #include <asm/uaccess.h> #include <asm/cacheflush.h> @@ -1608,6 +1609,7 @@ munmap_back: atomic_inc(&inode->i_writecount); out: perf_event_mmap(vma); + quadd_event_mmap(vma); vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT); if (vm_flags & VM_LOCKED) { @@ -2171,6 +2173,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address) spin_unlock(&vma->vm_mm->page_table_lock); perf_event_mmap(vma); + quadd_event_mmap(vma); } } } @@ -2240,6 +2243,7 @@ int expand_downwards(struct vm_area_struct *vma, spin_unlock(&vma->vm_mm->page_table_lock); perf_event_mmap(vma); + quadd_event_mmap(vma); } } } @@ -2693,6 +2697,8 @@ static unsigned long do_brk(unsigned long addr, unsigned long len) vma_link(mm, vma, prev, rb_link, rb_parent); out: perf_event_mmap(vma); + quadd_event_mmap(vma); + mm->total_vm += len >> PAGE_SHIFT; if (flags & VM_LOCKED) mm->locked_vm += (len >> PAGE_SHIFT); @@ -2977,6 +2983,7 @@ int install_special_mapping(struct mm_struct *mm, mm->total_vm += len >> PAGE_SHIFT; perf_event_mmap(vma); + quadd_event_mmap(vma); return 0; diff --git a/mm/mprotect.c b/mm/mprotect.c index ea4a0f32f8e1..78dba5ccd5b8 100644 --- a/mm/mprotect.c +++ b/mm/mprotect.c @@ -23,6 +23,7 @@ #include <linux/mmu_notifier.h> #include <linux/migrate.h> #include <linux/perf_event.h> +#include <linux/tegra_profiler.h> #include <asm/uaccess.h> #include <asm/pgtable.h> #include <asm/cacheflush.h> @@ -317,6 +318,7 @@ success: vm_stat_account(mm, oldflags, vma->vm_file, -nrpages); vm_stat_account(mm, newflags, vma->vm_file, nrpages); perf_event_mmap(vma); + quadd_event_mmap(vma); return 0; fail: |