From 4a37f8b0dbc1763f8a992d2c126258ea3190e529 Mon Sep 17 00:00:00 2001 From: Igor Nabirushkin Date: Mon, 27 Jan 2014 03:13:33 +0400 Subject: misc: tegra-profiler: use mmap calls Tegra Profiler: add mmap calls Bug 1447662 Change-Id: I96614ab3c320fd028cf861ea970b5199bdcae1c7 Signed-off-by: Igor Nabirushkin Reviewed-on: http://git-master/r/360152 Reviewed-by: Bharat Nihalani Tested-by: Bharat Nihalani --- mm/mmap.c | 7 +++++++ mm/mprotect.c | 2 ++ 2 files changed, 9 insertions(+) (limited to 'mm') 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 #include #include +#include #include #include @@ -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 #include #include +#include #include #include #include @@ -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: -- cgit v1.2.3