mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-11-23 12:51:06 +00:00
Backed out changeset 819d4c9682d4 (bug 1908630) as requested for working in the incorrect sandbox. CLOSED TREE
This commit is contained in:
parent
eb27ec839c
commit
e9d76de444
@ -15,23 +15,11 @@ def Binary():
|
||||
OS_LIBS += ["log"]
|
||||
|
||||
|
||||
@template
|
||||
def MaybeAddProfiling(name):
|
||||
if (
|
||||
CONFIG["MOZ_ENABLE_FORKSERVER"]
|
||||
and CONFIG["OS_TARGET"] == "Linux"
|
||||
and CONFIG["MOZ_PROFILE_GENERATE"] == "1"
|
||||
):
|
||||
USE_LIBS += ["profiling"]
|
||||
|
||||
|
||||
@template
|
||||
def Program(name):
|
||||
"""Template for program executables."""
|
||||
PROGRAM = name
|
||||
|
||||
MaybeAddProfiling(name)
|
||||
|
||||
Binary()
|
||||
|
||||
|
||||
@ -138,8 +126,6 @@ def SharedLibrary(name, output_category=None):
|
||||
if output_category:
|
||||
SHARED_LIBRARY_OUTPUT_CATEGORY = output_category
|
||||
|
||||
MaybeAddProfiling(name)
|
||||
|
||||
Binary()
|
||||
|
||||
|
||||
|
@ -6,10 +6,3 @@
|
||||
|
||||
if CONFIG["USE_ELF_HACK"] or CONFIG["RELRHACK"]:
|
||||
DIRS += ["elfhack"]
|
||||
|
||||
if (
|
||||
CONFIG["MOZ_ENABLE_FORKSERVER"]
|
||||
and CONFIG["OS_TARGET"] == "Linux"
|
||||
and CONFIG["MOZ_PROFILE_GENERATE"] == "1"
|
||||
):
|
||||
DIRS += ["profiling"]
|
||||
|
@ -1,9 +0,0 @@
|
||||
# -*- Mode: python; 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/.
|
||||
|
||||
Library("profiling")
|
||||
|
||||
SOURCES += ["profiling.cpp"]
|
@ -1,44 +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/. */
|
||||
|
||||
#if defined(MOZ_PROFILE_GENERATE) && defined(XP_LINUX) && !defined(ANDROID)
|
||||
|
||||
# include <pthread.h>
|
||||
# include <stdio.h>
|
||||
# include <stdlib.h>
|
||||
# include <unistd.h>
|
||||
# include <errno.h>
|
||||
|
||||
# if defined(__cplusplus)
|
||||
extern "C" {
|
||||
# endif
|
||||
void __llvm_profile_initialize(void);
|
||||
void __llvm_profile_initialize_file(void);
|
||||
void __llvm_profile_set_filename(const char*);
|
||||
|
||||
// Use the API to force a different filename, then set back the original one.
|
||||
// This will make sure the pattern is re-parsed and thus the PID properly
|
||||
// updated within the lprofCurFilename struct.
|
||||
static void updateFilenameAfterFork(void) {
|
||||
__llvm_profile_set_filename("default.profraw");
|
||||
__llvm_profile_initialize_file();
|
||||
__llvm_profile_set_filename(getenv("LLVM_PROFILE_FILE"));
|
||||
__llvm_profile_initialize_file();
|
||||
}
|
||||
|
||||
static int CustomRegisterRuntime(void) {
|
||||
__llvm_profile_initialize();
|
||||
if (pthread_atfork(NULL, NULL, updateFilenameAfterFork) < 0) {
|
||||
fprintf(stderr, "[%d] [%s] pthread_atfork()=%d\n", getpid(),
|
||||
__PRETTY_FUNCTION__, errno);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
int __llvm_profile_runtime = CustomRegisterRuntime();
|
||||
# if defined(__cplusplus)
|
||||
}
|
||||
# endif
|
||||
#endif // defined(MOZ_PROFILE_GENERATE) && defined(XP_LINUX) &&
|
||||
// !defined(ANDROID)
|
@ -2938,7 +2938,7 @@
|
||||
#ifdef MOZ_ENABLE_FORKSERVER
|
||||
- name: dom.ipc.forkserver.enable
|
||||
type: bool
|
||||
#if defined(MOZ_CODE_COVERAGE) || defined(MOZ_ASAN) || defined(MOZ_TSAN) || defined(MOZ_MSAN) || defined(MOZ_UBSAN)
|
||||
#if defined(MOZ_CODE_COVERAGE) || defined(MOZ_ASAN) || defined(MOZ_TSAN) || defined(MOZ_MSAN) || defined(MOZ_UBSAN) || defined(MOZ_PROFILE_GENERATE)
|
||||
value: false
|
||||
#else
|
||||
value: false
|
||||
|
Loading…
Reference in New Issue
Block a user