author | Wolfgang Rosenauer <wr@rosenauer.org> |
Sun, 17 Mar 2019 10:00:10 +0100 | |
changeset 1088 | 84cdfb476431 |
parent 1085 | 87f893cf45b9 |
child 1089 | eca1c1f2fe50 |
permissions | -rw-r--r-- |
1076 | 1 |
|
2 |
# HG changeset patch |
|
3 |
# User Mike Hommey <mh+mozilla@glandium.org> |
|
4 |
# Date 1526871862 -32400 |
|
5 |
# Node ID 94f21505ff13cd089f7129cd24927cf8b31a0f43 |
|
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
6 |
# Parent 25ab6bab437517a8a182f1ab77898ae13b26a696 |
1076 | 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 |
|
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
19 |
@@ -1,38 +0,0 @@ |
1076 | 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*)> |
|
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
40 |
-__attribute__((naked)) void SignalTrampoline(int aSignal, siginfo_t* aInfo, |
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
41 |
- void* aContext) { |
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
42 |
- asm volatile("nop; nop; nop; nop" : : : "memory"); |
1076 | 43 |
- |
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
44 |
- asm volatile("b %0" : : "X"(H) : "memory"); |
1076 | 45 |
-} |
46 |
- |
|
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
47 |
-#define MOZ_SIGNAL_TRAMPOLINE(h) (mozilla::SignalTrampoline<h>) |
1076 | 48 |
- |
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
49 |
-#else // __arm__ |
1076 | 50 |
- |
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
51 |
-#define MOZ_SIGNAL_TRAMPOLINE(h) (h) |
1076 | 52 |
- |
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
53 |
-#endif // __arm__ |
1076 | 54 |
- |
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
55 |
-} // namespace mozilla |
1076 | 56 |
- |
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
57 |
-#endif // mozilla_LinuxSignal_h |
1076 | 58 |
diff --git a/mfbt/moz.build b/mfbt/moz.build |
59 |
--- a/mfbt/moz.build |
|
60 |
+++ b/mfbt/moz.build |
|
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
61 |
@@ -124,20 +124,16 @@ EXPORTS["double-conversion"] = [ |
1076 | 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__ |
|
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
87 |
#include <execinfo.h> // backtrace, backtrace_symbols |
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
88 |
#endif // def __GLIBC__ |
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
89 |
#include <strings.h> // index |
1076 | 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 |
||
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
103 |
@@ -248,17 +247,17 @@ Sampler::Sampler(PSLockRef aLock) |
1076 | 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 |
||
1085
87f893cf45b9
Firefox 65.0 release
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
1076
diff
changeset
|
121 |
void Sampler::Disable(PSLockRef aLock) { |