Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(12)

Unified Diff: base/allocator/allocator_shim_override_glibc_weak_symbols.h

Issue 2748083004: Set noinline attribute on exported shim layer functions. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « base/allocator/allocator_shim_internals.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: base/allocator/allocator_shim_override_glibc_weak_symbols.h
diff --git a/base/allocator/allocator_shim_override_glibc_weak_symbols.h b/base/allocator/allocator_shim_override_glibc_weak_symbols.h
index b1296369c1ec123aa101b0e10164244420252808..7f50ac81c308404cb7d4a6ad2b2bce084316dca8 100644
--- a/base/allocator/allocator_shim_override_glibc_weak_symbols.h
+++ b/base/allocator/allocator_shim_override_glibc_weak_symbols.h
@@ -56,23 +56,21 @@ void* GlibcMemalignHook(size_t align, size_t size, const void* caller) {
} // namespace
-SHIM_ALWAYS_EXPORT void* (*MALLOC_HOOK_MAYBE_VOLATILE __malloc_hook)(
- size_t,
- const void*) = &GlibcMallocHook;
-
-SHIM_ALWAYS_EXPORT void* (*MALLOC_HOOK_MAYBE_VOLATILE __realloc_hook)(
- void*,
- size_t,
- const void*) = &GlibcReallocHook;
-
-SHIM_ALWAYS_EXPORT void (*MALLOC_HOOK_MAYBE_VOLATILE __free_hook)(void*,
- const void*) =
- &GlibcFreeHook;
-
-SHIM_ALWAYS_EXPORT void* (*MALLOC_HOOK_MAYBE_VOLATILE __memalign_hook)(
- size_t,
- size_t,
- const void*) = &GlibcMemalignHook;
+__attribute__((visibility("default"))) void* (
Primiano Tucci (use gerrit) 2017/03/15 11:42:59 Why are you changing this? If is just about perfor
+ *MALLOC_HOOK_MAYBE_VOLATILE __malloc_hook)(size_t,
+ const void*) = &GlibcMallocHook;
+
+__attribute__((visibility("default"))) void* (
+ *MALLOC_HOOK_MAYBE_VOLATILE __realloc_hook)(void*, size_t, const void*) =
+ &GlibcReallocHook;
+
+__attribute__((visibility("default"))) void (
+ *MALLOC_HOOK_MAYBE_VOLATILE __free_hook)(void*,
+ const void*) = &GlibcFreeHook;
+
+__attribute__((visibility("default"))) void* (
+ *MALLOC_HOOK_MAYBE_VOLATILE __memalign_hook)(size_t, size_t, const void*) =
+ &GlibcMemalignHook;
// 2) Redefine libc symbols themselves.
« no previous file with comments | « base/allocator/allocator_shim_internals.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698