mozilla-bmo1463035.patch
branchfirefox60
changeset 1090 554cd9503f75
child 1091 cbed5671ff47
equal deleted inserted replaced
1080:e8d4a33582b8 1090:554cd9503f75
       
     1 
       
     2 # HG changeset patch
       
     3 # User Mike Hommey <mh+mozilla@glandium.org>
       
     4 # Date 1526871862 -32400
       
     5 # Node ID 94f21505ff13cd089f7129cd24927cf8b31a0f43
       
     6 # Parent  4a2e8085417fe782738bfd736b69806d9ed19d6a
       
     7 Bug 1463035 - Remove MOZ_SIGNAL_TRAMPOLINE. r?darchons
       
     8 
       
     9 For some reason, GNU as is not happy with the assembly generated after
       
    10 bug 1238661 anymore on Debian armel.
       
    11 
       
    12 OTOH, as mentioned in bug 1238661 comment 4, we actually don't need this
       
    13 workaround anymore, so let's just kill it.
       
    14 
       
    15 diff --git a/mfbt/LinuxSignal.h b/mfbt/LinuxSignal.h
       
    16 deleted file mode 100644
       
    17 --- a/mfbt/LinuxSignal.h
       
    18 +++ /dev/null
       
    19 @@ -1,38 +0,0 @@
       
    20 -/* This Source Code Form is subject to the terms of the Mozilla Public
       
    21 - * License, v. 2.0. If a copy of the MPL was not distributed with this
       
    22 - * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
       
    23 -
       
    24 -#ifndef mozilla_LinuxSignal_h
       
    25 -#define mozilla_LinuxSignal_h
       
    26 -
       
    27 -namespace mozilla {
       
    28 -
       
    29 -#if defined(__arm__)
       
    30 -
       
    31 -// Some (old) Linux kernels on ARM have a bug where a signal handler
       
    32 -// can be called without clearing the IT bits in CPSR first. The result
       
    33 -// is that the first few instructions of the handler could be skipped,
       
    34 -// ultimately resulting in crashes. To workaround this bug, the handler
       
    35 -// on ARM is a trampoline that starts with enough NOP instructions, so
       
    36 -// that even if the IT bits are not cleared, only the NOP instructions
       
    37 -// will be skipped over.
       
    38 -
       
    39 -template <void (*H)(int, siginfo_t*, void*)>
       
    40 -__attribute__((naked)) void SignalTrampoline(int aSignal, siginfo_t* aInfo,
       
    41 -                                             void* aContext) {
       
    42 -  asm volatile("nop; nop; nop; nop" : : : "memory");
       
    43 -
       
    44 -  asm volatile("b %0" : : "X"(H) : "memory");
       
    45 -}
       
    46 -
       
    47 -#define MOZ_SIGNAL_TRAMPOLINE(h) (mozilla::SignalTrampoline<h>)
       
    48 -
       
    49 -#else  // __arm__
       
    50 -
       
    51 -#define MOZ_SIGNAL_TRAMPOLINE(h) (h)
       
    52 -
       
    53 -#endif  // __arm__
       
    54 -
       
    55 -}  // namespace mozilla
       
    56 -
       
    57 -#endif  // mozilla_LinuxSignal_h
       
    58 diff --git a/mfbt/moz.build b/mfbt/moz.build
       
    59 --- a/mfbt/moz.build
       
    60 +++ b/mfbt/moz.build
       
    61 @@ -115,20 +115,16 @@ EXPORTS["double-conversion"] = [
       
    62  LOCAL_INCLUDES += [
       
    63      '/mfbt/double-conversion',
       
    64  ]
       
    65  
       
    66  if CONFIG['OS_ARCH'] == 'WINNT':
       
    67      EXPORTS.mozilla += [
       
    68          'WindowsVersion.h',
       
    69      ]
       
    70 -elif CONFIG['OS_ARCH'] == 'Linux':
       
    71 -    EXPORTS.mozilla += [
       
    72 -        'LinuxSignal.h',
       
    73 -    ]
       
    74  
       
    75  UNIFIED_SOURCES += [
       
    76      'Assertions.cpp',
       
    77      'ChaosMode.cpp',
       
    78      'double-conversion/double-conversion/bignum-dtoa.cc',
       
    79      'double-conversion/double-conversion/bignum.cc',
       
    80      'double-conversion/double-conversion/cached-powers.cc',
       
    81      'double-conversion/double-conversion/diy-fp.cc',
       
    82 diff --git a/tools/profiler/core/platform-linux-android.cpp b/tools/profiler/core/platform-linux-android.cpp
       
    83 --- a/tools/profiler/core/platform-linux-android.cpp
       
    84 +++ b/tools/profiler/core/platform-linux-android.cpp
       
    85 @@ -55,17 +55,16 @@
       
    86  #ifdef __GLIBC__
       
    87  #include <execinfo.h>  // backtrace, backtrace_symbols
       
    88  #endif                 // def __GLIBC__
       
    89  #include <strings.h>   // index
       
    90  #include <errno.h>
       
    91  #include <stdarg.h>
       
    92  
       
    93  #include "prenv.h"
       
    94 -#include "mozilla/LinuxSignal.h"
       
    95  #include "mozilla/PodOperations.h"
       
    96  #include "mozilla/DebugOnly.h"
       
    97  
       
    98  #include <string.h>
       
    99  #include <list>
       
   100  
       
   101  using namespace mozilla;
       
   102  
       
   103 @@ -248,17 +247,17 @@ Sampler::Sampler(PSLockRef aLock)
       
   104  
       
   105    // NOTE: We don't initialize LUL here, instead initializing it in
       
   106    // SamplerThread's constructor. This is because with the
       
   107    // profiler_suspend_and_sample_thread entry point, we want to be able to
       
   108    // sample without waiting for LUL to be initialized.
       
   109  
       
   110    // Request profiling signals.
       
   111    struct sigaction sa;
       
   112 -  sa.sa_sigaction = MOZ_SIGNAL_TRAMPOLINE(SigprofHandler);
       
   113 +  sa.sa_sigaction = SigprofHandler;
       
   114    sigemptyset(&sa.sa_mask);
       
   115    sa.sa_flags = SA_RESTART | SA_SIGINFO;
       
   116    if (sigaction(SIGPROF, &sa, &mOldSigprofHandler) != 0) {
       
   117      MOZ_CRASH("Error installing SIGPROF handler in the profiler");
       
   118    }
       
   119  }
       
   120  
       
   121  void Sampler::Disable(PSLockRef aLock) {