Open honggyukim opened 5 years ago
$ git log -1 --oneline
30f86b24eeb5e (HEAD -> refs/heads/114.0.5715.1, tag: refs/tags/114.0.5715.1) Publish DEPS for 114.0.5715.1
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index d0b55ce295fdf..8ca5912034e5a 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -850,6 +850,10 @@ config("compiler") {
asmflags += cflags_c
}
+ if (use_uftrace) {
+ cflags += [ "-g", "-fpatchable-function-entry=5" ]
+ }
+
# Rust compiler flags setup.
# ---------------------------
rustflags = [
diff --git a/build/config/compiler/compiler.gni b/build/config/compiler/compiler.gni
index 4738ee80d307c..300b72b0b08fc 100644
--- a/build/config/compiler/compiler.gni
+++ b/build/config/compiler/compiler.gni
@@ -106,6 +106,9 @@ declare_args() {
# x86{,_64}.
using_mismatched_sample_profile = current_cpu != "x64" && current_cpu != "x86"
+ # Enables -g -fpatchable-function-entry=5 for uftrace
+ use_uftrace = false
+
# Whether an error should be raised on attempts to make debug builds with
# is_component_build=false. Very large debug symbols can have unwanted side
# effects so this is enforced by default for chromium.
diff --git a/base/debug/stack_trace.cc b/base/debug/stack_trace.cc
index 3debc8bd070cd..82e2db29d0883 100644
--- a/base/debug/stack_trace.cc
+++ b/base/debug/stack_trace.cc
@@ -273,7 +273,6 @@ void StackTrace::Print() const {
}
void StackTrace::OutputToStream(std::ostream* os) const {
- OutputToStreamWithPrefix(os, nullptr);
}
std::string StackTrace::ToString() const {
@@ -281,9 +280,6 @@ std::string StackTrace::ToString() const {
}
std::string StackTrace::ToStringWithPrefix(const char* prefix_string) const {
std::stringstream stream;
-#if !defined(__UCLIBC__) && !defined(_AIX)
- OutputToStreamWithPrefix(&stream, prefix_string);
-#endif
return stream.str();
}
diff --git a/base/debug/stack_trace_posix.cc b/base/debug/stack_trace_posix.cc
index 0eaad5ce3348c..6436847c5bd98 100644
--- a/base/debug/stack_trace_posix.cc
+++ b/base/debug/stack_trace_posix.cc
@@ -42,7 +42,6 @@
// libc.
#if BUILDFLAG(IS_APPLE) || \
(defined(__GLIBC__) && !defined(__UCLIBC__) && !defined(__AIX))
-#define HAVE_BACKTRACE
#include <execinfo.h>
#endif
To fix build error.
diff --git a/third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py b/third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py
index 2c03e6835f3af..6c72cefe6f6aa 100644
--- a/third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py
+++ b/third_party/dom_distiller_js/protoc_plugins/util/plugin_protos.py
@@ -15,10 +15,10 @@ import sys
SCRIPT_DIR = os.path.dirname(__file__)
SRC_DIR = os.path.abspath(os.path.join(SCRIPT_DIR, '..', '..', '..', '..'))
-sys.path.insert(
- 1, os.path.join(SRC_DIR, 'third_party', 'protobuf', 'python'))
-sys.path.insert(
- 1, os.path.join(SRC_DIR, 'third_party', 'protobuf', 'third_party', 'six'))
+#sys.path.insert(
+# 1, os.path.join(SRC_DIR, 'third_party', 'protobuf', 'python'))
+#sys.path.insert(
+# 1, os.path.join(SRC_DIR, 'third_party', 'protobuf', 'third_party', 'six'))
from google.protobuf.descriptor_pb2 import FieldDescriptorProto
from google.protobuf.compiler import plugin_pb2
NOTE: This code MUST be async-signal safe (it's used by in-process stack dumping signal handler). NO malloc or stdio is allowed here.
size_t CollectStackTrace(void** trace, size_t count) {
// NOTE: This code MUST be async-signal safe (it's used by in-process
// stack dumping signal handler). NO malloc or stdio is allowed here.
#if defined(NO_UNWIND_TABLES) && BUILDFLAG(CAN_UNWIND_WITH_FRAME_POINTERS)
// If we do not have unwind tables, then try tracing using frame pointers.
return base::debug::TraceStackFramePointers(const_cast<const void**>(trace),
count, 0);
#elif defined(HAVE_BACKTRACE)
// Though the backtrace API man page does not list any possible negative
// return values, we take no chance.
return base::saturated_cast<size_t>(
backtrace(trace, base::saturated_cast<int>(count)));
#else
return 0;
#endif
}
base/debug/stack_trace_posix.cc
$ uftrace record -P. --no-libcall -v ./chrome --no-sandbox --headless --disable-gpu \
--screenshot --window-size=1280,1696 https://www.google.com
top level change
inside
src/third_party/ffmpeg
inside
src/third_party/swiftshader
build command
To know more about other options,
gn args out/Release.g.pg --list
will show the entire options.