Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 78195 Details for
Bug 114008
-Wl,-Bdirect speed-up ...
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
[patch]
glibc-2.3.6-ld.so-madvise.diff
glibc-2.3.6-ld.so-madvise.diff (text/plain), 3.57 KB, created by
Alexey Maximov
on 2006-01-26 10:29:34 UTC
(
hide
)
Description:
glibc-2.3.6-ld.so-madvise.diff
Filename:
MIME Type:
Creator:
Alexey Maximov
Created:
2006-01-26 10:29:34 UTC
Size:
3.57 KB
patch
obsolete
>diff -ruN glibc-2.3.6.orig/elf/dl-load.c glibc-2.3.6/elf/dl-load.c >--- glibc-2.3.6.orig/elf/dl-load.c 2005-04-06 09:50:10.000000000 +0700 >+++ glibc-2.3.6/elf/dl-load.c 2006-01-27 00:24:17.487899649 +0600 >@@ -1150,6 +1150,9 @@ > goto call_lose_errno; > } > >+ if (GLRO(dl_madvise)) >+ __madvise ((void *) l->l_map_start, maplength, MADV_WILLNEED); >+ > l->l_map_end = l->l_map_start + maplength; > l->l_addr = l->l_map_start - c->mapstart; > >diff -ruN glibc-2.3.6.orig/elf/dl-support.c glibc-2.3.6/elf/dl-support.c >--- glibc-2.3.6.orig/elf/dl-support.c 2006-01-27 00:18:58.000000000 +0600 >+++ glibc-2.3.6/elf/dl-support.c 2006-01-27 00:25:07.744464197 +0600 >@@ -48,6 +48,8 @@ > /* If nonzero print warnings about problematic situations. */ > int _dl_verbose; > >+int _dl_madvise; >+ > /* We never do profiling. */ > const char *_dl_profile; > const char *_dl_profile_output; >@@ -243,6 +245,8 @@ > > _dl_direct = *(getenv ("LD_BIND_DIRECT") ?: "") == '\0'; > >+ _dl_madvise = *(getenv ("LD_NOMADVISE") ?: "") == '\0'; >+ > _dl_bind_not = *(getenv ("LD_BIND_NOT") ?: "") != '\0'; > > _dl_dynamic_weak = *(getenv ("LD_DYNAMIC_WEAK") ?: "") == '\0'; >diff -ruN glibc-2.3.6.orig/elf/rtld.c glibc-2.3.6/elf/rtld.c >--- glibc-2.3.6.orig/elf/rtld.c 2006-01-27 00:18:58.000000000 +0600 >+++ glibc-2.3.6/elf/rtld.c 2006-01-27 00:24:17.533888271 +0600 >@@ -125,6 +125,7 @@ > ._dl_lazy = 1, > ._dl_direct = 0, > ._dl_fpu_control = _FPU_DEFAULT, >+ ._dl_madvise = 1, > > /* Function pointers. */ > ._dl_get_origin = _dl_get_origin, >@@ -2155,6 +2156,14 @@ > break; > > case 9: >+ /* Test whether we should not advise the kernel >+ about memory usage. */ >+ if (memcmp (envline, "NOMADVISE", 9) == 0) >+ { >+ GLRO(dl_madvise) = envline[10] == '\0'; >+ break; >+ } >+ > /* Test whether we want to see the content of the auxiliary > array passed up from the kernel. */ > if (!INTUSE(__libc_enable_secure) >diff -ruN glibc-2.3.6.orig/include/sys/mman.h glibc-2.3.6/include/sys/mman.h >--- glibc-2.3.6.orig/include/sys/mman.h 1999-11-26 01:02:03.000000000 +0600 >+++ glibc-2.3.6/include/sys/mman.h 2006-01-27 00:24:17.563880850 +0600 >@@ -8,6 +8,7 @@ > int __flags, int __fd, __off64_t __offset); > extern int __munmap (void *__addr, size_t __len); > extern int __mprotect (void *__addr, size_t __len, int __prot); >+extern int __madvise (void *__addr, size_t __len, int __advise); > > /* This one is Linux specific. */ > extern void *__mremap (void *__addr, size_t __old_len, >diff -ruN glibc-2.3.6.orig/sysdeps/generic/ldsodefs.h glibc-2.3.6/sysdeps/generic/ldsodefs.h >--- glibc-2.3.6.orig/sysdeps/generic/ldsodefs.h 2006-01-27 00:18:58.000000000 +0600 >+++ glibc-2.3.6/sysdeps/generic/ldsodefs.h 2006-01-27 00:24:17.578877140 +0600 >@@ -417,6 +417,9 @@ > /* Do we do direct relocations? */ > EXTERN int _dl_direct; > >+ /* Should we advise kernel about memory usage? */ >+ EXTERN int _dl_madvise; >+ > /* Nonzero if runtime lookups should not update the .got/.plt. */ > EXTERN int _dl_bind_not; > >diff -ruN glibc-2.3.6.orig/sysdeps/unix/sysv/linux/syscalls.list glibc-2.3.6/sysdeps/unix/sysv/linux/syscalls.list >--- glibc-2.3.6.orig/sysdeps/unix/sysv/linux/syscalls.list 2004-11-12 07:15:38.000000000 +0600 >+++ glibc-2.3.6/sysdeps/unix/sysv/linux/syscalls.list 2006-01-27 00:24:17.580876645 +0600 >@@ -31,7 +31,7 @@ > klogctl EXTRA syslog i:isi klogctl > lchown - lchown i:sii __lchown lchown > posix_madvise - madvise Vi:pii posix_madvise >-madvise - madvise i:pii madvise >+madvise - madvise i:pii __madvise madvise > mincore - mincore i:anV mincore > mlock - mlock i:bn mlock > mlockall - mlockall i:i mlockall
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 114008
:
74762
|
75104
|
77828
|
77830
|
77840
|
78188
|
78189
|
78190
|
78191
|
78192
|
78193
|
78194
| 78195 |
78196
|
78213
|
80806
|
80807
|
80808
|
80809
|
84585
|
84615
|
84616
|
84617
|
86630
|
89027
|
451452
|
451454