author | Ms2ger <Ms2ger@gmail.com> |
Mon, 07 Mar 2016 14:59:13 +0100 | |
changeset 324966 | dd46a77cdf656048cce156d66fe0988e2e34ba84 |
parent 324965 | db12e253eb848d6644284f3ca034ae01e0ca4ed6 |
child 324967 | 2f9b726495d18514f553bb64aea96f22f19ca15b |
push id | 6048 |
push user | kmoir@mozilla.com |
push date | Mon, 06 Jun 2016 19:02:08 +0000 |
treeherder | mozilla-beta@46d72a56c57d [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | ted |
bugs | 1253622 |
milestone | 47.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
probes/Makefile.in | file | annotate | diff | comparison | revisions | |
probes/moz.build | file | annotate | diff | comparison | revisions | |
probes/trace-gen.py | file | annotate | diff | comparison | revisions |
deleted file mode 100644 --- a/probes/Makefile.in +++ /dev/null @@ -1,14 +0,0 @@ -# This Source Code Form is subject to the terms of the Mozilla Public -# License, v. 2.0. If a copy of the MPL was not distributed with this -# file, You can obtain one at http://mozilla.org/MPL/2.0/. - -ifdef HAVE_DTRACE -export:: $(DIST)/include/mozilla-trace.h - -# Replace _DTRACE_VERSION with INCLUDE_MOZILLA_DTRACE -$(DIST)/include/mozilla-trace.h: mozilla-trace.d Makefile - dtrace -x nolibs -h -s $(srcdir)/mozilla-trace.d -o mozilla-trace.h.tmp - sed -e 's/if _DTRACE_VERSION/ifdef INCLUDE_MOZILLA_DTRACE/' \ - mozilla-trace.h.tmp > $(DIST)/include/mozilla-trace.h - rm mozilla-trace.h.tmp -endif
--- a/probes/moz.build +++ b/probes/moz.build @@ -1,6 +1,18 @@ # -*- Mode: python; c-basic-offset: 4; indent-tabs-mode: nil; tab-width: 40 -*- # vim: set filetype=python: # This Source Code Form is subject to the terms of the Mozilla Public # License, v. 2.0. If a copy of the MPL was not distributed with this # file, You can obtain one at http://mozilla.org/MPL/2.0/. +if CONFIG['HAVE_DTRACE']: + EXPORTS += [ + '!mozilla-trace.h', + ] + + GENERATED_FILES += [ + 'mozilla-trace.h', + ] + + trace = GENERATED_FILES['mozilla-trace.h'] + trace.script = 'trace-gen.py' + trace.inputs += ['mozilla-trace.d']
new file mode 100644 --- /dev/null +++ b/probes/trace-gen.py @@ -0,0 +1,15 @@ +# This Source Code Form is subject to the terms of the Mozilla Public +# License, v. 2.0. If a copy of the MPL was not distributed with this +# file, You can obtain one at http://mozilla.org/MPL/2.0/. + +import os +import subprocess + +def main(fp, input): + temporary_file = 'mozilla-trace.h.tmp' + subprocess.check_call(['dtrace', '-x', 'nolibs', '-h', '-s', input, '-o', temporary_file]) + + with open(temporary_file, 'r') as temporary_fp: + output = temporary_fp.read() + fp.write(output.replace('if _DTRACE_VERSION', 'ifdef INCLUDE_MOZILLA_DTRACE')) + os.remove(temporary_file)