diff options
author | Igor Nabirushkin <inabirushkin@nvidia.com> | 2014-01-27 03:13:33 +0400 |
---|---|---|
committer | Riham Haidar <rhaidar@nvidia.com> | 2014-02-19 16:09:41 -0800 |
commit | d88d5588b4065128fd3eb7300ea498954d982441 (patch) | |
tree | 2db1dc1db945e7b18a3c334f021f697c8a667321 /mm | |
parent | dc6c3f57c97814269da805492139e95056c48579 (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
(cherry picked from commit 6c4eaeece04690ea442d3c4b6cd74d6fa9ae121e)
Reviewed-on: http://git-master/r/368214
GVS: Gerrit_Virtual_Submit
Tested-by: Maxim Morin <mmorin@nvidia.com>
Reviewed-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 922de71fc759..007aa5b672b9 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> @@ -1363,6 +1364,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); @@ -1770,6 +1772,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); } } } @@ -1821,6 +1824,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); } } } @@ -2255,6 +2259,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)) @@ -2536,6 +2542,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: |