diff options
author | Igor Nabirushkin <inabirushkin@nvidia.com> | 2014-01-27 03:13:33 +0400 |
---|---|---|
committer | Gabby Lee <galee@nvidia.com> | 2014-02-12 20:46:52 -0800 |
commit | 6c4eaeece04690ea442d3c4b6cd74d6fa9ae121e (patch) | |
tree | 0719283407cc1dc1c37a2ebf906621ef99768d53 /mm | |
parent | 868545a99d8385a850fc87a4ad97dc8fb44a6e76 (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/365889
Tested-by: Daniel Horowitz <dhorowitz@nvidia.com>
Reviewed-by: Gabby Lee <galee@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 ed884dd9674b..4c83f857801c 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -30,6 +30,7 @@ #include <linux/perf_event.h> #include <linux/audit.h> #include <linux/khugepaged.h> +#include <linux/tegra_profiler.h> #include <asm/uaccess.h> #include <asm/cacheflush.h> @@ -1367,6 +1368,7 @@ munmap_back: atomic_inc(&inode->i_writecount); out: perf_event_mmap(vma); + quadd_event_mmap(vma); mm->total_vm += len >> PAGE_SHIFT; vm_stat_account(mm, vm_flags, file, len >> PAGE_SHIFT); @@ -1774,6 +1776,7 @@ int expand_upwards(struct vm_area_struct *vma, unsigned long address) if (!error) { vma->vm_end = address; perf_event_mmap(vma); + quadd_event_mmap(vma); } } } @@ -1825,6 +1828,7 @@ int expand_downwards(struct vm_area_struct *vma, vma->vm_start = address; vma->vm_pgoff -= grow; perf_event_mmap(vma); + quadd_event_mmap(vma); } } } @@ -2259,6 +2263,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) { if (!mlock_vma_pages_range(vma, addr, addr + len)) @@ -2540,6 +2546,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 a40992610ab6..83621b046f75 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> @@ -222,6 +223,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: |