Loading...
gen/stack_logging.c Libc-391.1.21 Libc-391
--- Libc/Libc-391.1.21/gen/stack_logging.c
+++ Libc/Libc-391/gen/stack_logging.c
@@ -57,17 +57,9 @@
 
 /***************	Recording stack		***********/
 
-// The three functions below are marked as noinline to ensure consistent inlining across
-// all versions of GCC and all compiler flags.  The malloc stack logging code expects
-// these functions to not be inlined.
-// For details, see <rdar://problem/4199620>.
-//
-// The performance cost of not inlining these functions is negligible, and they're only
-// called when MallocStackLogging is set anyway, so they won't affect normal usage.
-
-static __attribute__((noinline)) void *first_frame_address(void) {
+static void *first_frame_address(void) {
 #if defined(__i386__)
-    return __builtin_frame_address(0);
+    return __builtin_frame_address(1);
 #elif defined(__ppc__) || defined(__ppc64__)
     void *addr;
 #warning __builtin_frame_address IS BROKEN IN BEAKER: RADAR #2340421
@@ -79,7 +71,7 @@
 #endif
 }
 
-static __attribute__((noinline)) void *next_frame_address(void *addr) {
+static void *next_frame_address(void *addr) {
     void *ret;
 #if defined(__MACH__) && defined(__i386__)
     __asm__ volatile("movl (%1),%0" : "=r" (ret) : "r" (addr));
@@ -108,7 +100,7 @@
 #error  ********** Unimplemented architecture
 #endif
 
-__attribute__((noinline)) void thread_stack_pcs(vm_address_t *buffer, unsigned max, unsigned *nb) {
+void thread_stack_pcs(vm_address_t *buffer, unsigned max, unsigned *nb) {
     void *addr;
     addr = first_frame_address();
     *nb = 0;