Title: [5904] trunk/fs/binfmt_flat.c: Not do anonymous mmap when oprofiling flat format application, let oprofile daemon can find out the file path.
- Revision
- 5904
- Author
- gyang
- Date
- 2008-12-19 04:55:25 -0600 (Fri, 19 Dec 2008)
Log Message
Not do anonymous mmap when oprofiling flat format application, let oprofile daemon can find out the file path.
Modified Paths
Diff
Modified: trunk/fs/binfmt_flat.c (5903 => 5904)
--- trunk/fs/binfmt_flat.c 2008-12-19 10:50:54 UTC (rev 5903)
+++ trunk/fs/binfmt_flat.c 2008-12-19 10:55:25 UTC (rev 5904)
@@ -608,7 +608,11 @@
len = text_len + data_len + extra + MAX_SHARED_LIBS * sizeof(unsigned long);
len = PAGE_ALIGN(len);
down_write(¤t->mm->mmap_sem);
+#ifdef CONFIG_OPROFILE
+ textpos = do_mmap(bprm->file, 0, len,
+#else
textpos = do_mmap(0, 0, len,
+#endif
PROT_READ | PROT_EXEC | PROT_WRITE,
MAP_PRIVATE, 0);
up_write(¤t->mm->mmap_sem);
_______________________________________________
Linux-kernel-commits mailing list
[email protected]
http://blackfin.uclinux.org/mailman/listinfo/linux-kernel-commits