1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/tools/profiler/moz.build Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,116 @@ 1.4 +# -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- 1.5 +# vim: set filetype=python: 1.6 +# This Source Code Form is subject to the terms of the Mozilla Public 1.7 +# License, v. 2.0. If a copy of the MPL was not distributed with this 1.8 +# file, You can obtain one at http://mozilla.org/MPL/2.0/. 1.9 + 1.10 +if CONFIG['MOZ_ENABLE_PROFILER_SPS']: 1.11 + FAIL_ON_WARNINGS = True 1.12 + 1.13 + XPIDL_MODULE = 'profiler' 1.14 + XPIDL_SOURCES += [ 1.15 + 'nsIProfiler.idl', 1.16 + 'nsIProfileSaveEvent.idl', 1.17 + ] 1.18 + EXPORTS += [ 1.19 + 'GeckoProfilerFunc.h', 1.20 + 'GeckoProfilerImpl.h', 1.21 + 'ProfilerMarkers.h', 1.22 + 'PseudoStack.h', 1.23 + 'shared-libraries.h', 1.24 + ] 1.25 + EXTRA_JS_MODULES = [ 1.26 + 'Profiler.jsm', 1.27 + ] 1.28 + UNIFIED_SOURCES += [ 1.29 + 'BreakpadSampler.cpp', 1.30 + 'JSStreamWriter.cpp', 1.31 + 'nsProfiler.cpp', 1.32 + 'nsProfilerFactory.cpp', 1.33 + 'platform.cpp', 1.34 + 'ProfileEntry.cpp', 1.35 + 'ProfilerBacktrace.cpp', 1.36 + 'ProfilerIOInterposeObserver.cpp', 1.37 + 'ProfilerMarkers.cpp', 1.38 + 'SaveProfileTask.cpp', 1.39 + 'SyncProfile.cpp', 1.40 + 'TableTicker.cpp', 1.41 + 'UnwinderThread2.cpp', 1.42 + ] 1.43 + 1.44 + # This file cannot be built in unified mode because of name clashes with mozglue headers on Android. 1.45 + SOURCES += [ 1.46 + 'local_debug_info_symbolizer.cc', 1.47 + ] 1.48 + 1.49 + if CONFIG['OS_TARGET'] in ('Android', 'Linux'): 1.50 + UNIFIED_SOURCES += [ 1.51 + 'AutoObjectMapper.cpp', 1.52 + 'LulCommon.cpp', 1.53 + 'LulDwarf.cpp', 1.54 + 'LulDwarfSummariser.cpp', 1.55 + 'LulElf.cpp', 1.56 + 'LulMain.cpp', 1.57 + 'LulRWLock.cpp', 1.58 + ] 1.59 + # These files cannot be built in unified mode because of name clashes with mozglue headers on Android. 1.60 + SOURCES += [ 1.61 + 'platform-linux.cc', 1.62 + 'shared-libraries-linux.cc', 1.63 + ] 1.64 + if CONFIG['CPU_ARCH'] == 'arm': 1.65 + UNIFIED_SOURCES += [ 1.66 + 'LulExidx.cpp', 1.67 + ] 1.68 + SOURCES += [ 1.69 + 'EHABIStackWalk.cpp', 1.70 + ] 1.71 + elif CONFIG['OS_TARGET'] == 'Darwin': 1.72 + UNIFIED_SOURCES += [ 1.73 + 'platform-macos.cc', 1.74 + 'shared-libraries-macos.cc', 1.75 + 'shim_mac_dump_syms.mm', 1.76 + ] 1.77 + elif CONFIG['OS_TARGET'] == 'WINNT': 1.78 + SOURCES += [ 1.79 + 'IntelPowerGadget.cpp', 1.80 + 'platform-win32.cc', 1.81 + 'shared-libraries-win32.cc', 1.82 + ] 1.83 + 1.84 + LOCAL_INCLUDES += [ 1.85 + '/ipc/chromium/src', 1.86 + '/mozglue/linker', 1.87 + '/toolkit/crashreporter/google-breakpad/src', 1.88 + ] 1.89 + 1.90 + # We need access to Breakpad's getcontext(3) which is suitable for Android 1.91 + if CONFIG['OS_TARGET'] == 'Android': 1.92 + LOCAL_INCLUDES += [ 1.93 + '/toolkit/crashreporter/google-breakpad/src/common/android/include', 1.94 + ] 1.95 + 1.96 + if CONFIG['ANDROID_CPU_ARCH'] == 'armeabi': 1.97 + DEFINES['ARCH_ARMV6'] = True 1.98 + 1.99 + if CONFIG['ENABLE_TESTS']: 1.100 + DIRS += ['tests/gtest'] 1.101 + 1.102 + FINAL_LIBRARY = 'xul' 1.103 + 1.104 +EXPORTS += [ 1.105 + 'GeckoProfiler.h', 1.106 +] 1.107 + 1.108 +if CONFIG['MOZ_TASK_TRACER']: 1.109 + EXPORTS += [ 1.110 + 'GeckoTaskTracer.h', 1.111 + 'GeckoTaskTracerImpl.h', 1.112 + 'TracedTaskCommon.h', 1.113 + ] 1.114 + UNIFIED_SOURCES += [ 1.115 + 'GeckoTaskTracer.cpp', 1.116 + 'TracedTaskCommon.cpp', 1.117 + ] 1.118 + 1.119 +XPCSHELL_TESTS_MANIFESTS += ['tests/xpcshell.ini']