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