|
1 # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- |
|
2 # vim: set filetype=python: |
|
3 # This Source Code Form is subject to the terms of the Mozilla Public |
|
4 # License, v. 2.0. If a copy of the MPL was not distributed with this |
|
5 # file, You can obtain one at http://mozilla.org/MPL/2.0/. |
|
6 |
|
7 if CONFIG['MOZ_ENABLE_PROFILER_SPS']: |
|
8 FAIL_ON_WARNINGS = True |
|
9 |
|
10 XPIDL_MODULE = 'profiler' |
|
11 XPIDL_SOURCES += [ |
|
12 'nsIProfiler.idl', |
|
13 'nsIProfileSaveEvent.idl', |
|
14 ] |
|
15 EXPORTS += [ |
|
16 'GeckoProfilerFunc.h', |
|
17 'GeckoProfilerImpl.h', |
|
18 'ProfilerMarkers.h', |
|
19 'PseudoStack.h', |
|
20 'shared-libraries.h', |
|
21 ] |
|
22 EXTRA_JS_MODULES = [ |
|
23 'Profiler.jsm', |
|
24 ] |
|
25 UNIFIED_SOURCES += [ |
|
26 'BreakpadSampler.cpp', |
|
27 'JSStreamWriter.cpp', |
|
28 'nsProfiler.cpp', |
|
29 'nsProfilerFactory.cpp', |
|
30 'platform.cpp', |
|
31 'ProfileEntry.cpp', |
|
32 'ProfilerBacktrace.cpp', |
|
33 'ProfilerIOInterposeObserver.cpp', |
|
34 'ProfilerMarkers.cpp', |
|
35 'SaveProfileTask.cpp', |
|
36 'SyncProfile.cpp', |
|
37 'TableTicker.cpp', |
|
38 'UnwinderThread2.cpp', |
|
39 ] |
|
40 |
|
41 # This file cannot be built in unified mode because of name clashes with mozglue headers on Android. |
|
42 SOURCES += [ |
|
43 'local_debug_info_symbolizer.cc', |
|
44 ] |
|
45 |
|
46 if CONFIG['OS_TARGET'] in ('Android', 'Linux'): |
|
47 UNIFIED_SOURCES += [ |
|
48 'AutoObjectMapper.cpp', |
|
49 'LulCommon.cpp', |
|
50 'LulDwarf.cpp', |
|
51 'LulDwarfSummariser.cpp', |
|
52 'LulElf.cpp', |
|
53 'LulMain.cpp', |
|
54 'LulRWLock.cpp', |
|
55 ] |
|
56 # These files cannot be built in unified mode because of name clashes with mozglue headers on Android. |
|
57 SOURCES += [ |
|
58 'platform-linux.cc', |
|
59 'shared-libraries-linux.cc', |
|
60 ] |
|
61 if CONFIG['CPU_ARCH'] == 'arm': |
|
62 UNIFIED_SOURCES += [ |
|
63 'LulExidx.cpp', |
|
64 ] |
|
65 SOURCES += [ |
|
66 'EHABIStackWalk.cpp', |
|
67 ] |
|
68 elif CONFIG['OS_TARGET'] == 'Darwin': |
|
69 UNIFIED_SOURCES += [ |
|
70 'platform-macos.cc', |
|
71 'shared-libraries-macos.cc', |
|
72 'shim_mac_dump_syms.mm', |
|
73 ] |
|
74 elif CONFIG['OS_TARGET'] == 'WINNT': |
|
75 SOURCES += [ |
|
76 'IntelPowerGadget.cpp', |
|
77 'platform-win32.cc', |
|
78 'shared-libraries-win32.cc', |
|
79 ] |
|
80 |
|
81 LOCAL_INCLUDES += [ |
|
82 '/ipc/chromium/src', |
|
83 '/mozglue/linker', |
|
84 '/toolkit/crashreporter/google-breakpad/src', |
|
85 ] |
|
86 |
|
87 # We need access to Breakpad's getcontext(3) which is suitable for Android |
|
88 if CONFIG['OS_TARGET'] == 'Android': |
|
89 LOCAL_INCLUDES += [ |
|
90 '/toolkit/crashreporter/google-breakpad/src/common/android/include', |
|
91 ] |
|
92 |
|
93 if CONFIG['ANDROID_CPU_ARCH'] == 'armeabi': |
|
94 DEFINES['ARCH_ARMV6'] = True |
|
95 |
|
96 if CONFIG['ENABLE_TESTS']: |
|
97 DIRS += ['tests/gtest'] |
|
98 |
|
99 FINAL_LIBRARY = 'xul' |
|
100 |
|
101 EXPORTS += [ |
|
102 'GeckoProfiler.h', |
|
103 ] |
|
104 |
|
105 if CONFIG['MOZ_TASK_TRACER']: |
|
106 EXPORTS += [ |
|
107 'GeckoTaskTracer.h', |
|
108 'GeckoTaskTracerImpl.h', |
|
109 'TracedTaskCommon.h', |
|
110 ] |
|
111 UNIFIED_SOURCES += [ |
|
112 'GeckoTaskTracer.cpp', |
|
113 'TracedTaskCommon.cpp', |
|
114 ] |
|
115 |
|
116 XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini'] |