-
Notifications
You must be signed in to change notification settings - Fork 19
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Symbol resolution fails for system libraries in DevTools stack traces in Performance tab #95
Comments
The inspiration from this conversation(#97 (comment)) has led to the following progress: |
I checked the profile tool using three .so as follows profile_unopt
|
As a result of test and trying based on several config options, I think it depends on "//build/config:debug" |
@bbrto21, I think you've nailed it 👌 Thanks a lot 😃 Native symbols indeed resolve after adding The question now is, what should we do about it? IMO, turning What about just adding information, that adding @bbrto21, @swift-kim what do you think about it? |
Agreed.
Right. Turning on the unopt flag significantly lowers the performance as well. And that's why we can't use the "unoptimized" binaries for CPU profiling and performance analysis. So if we want to get correct results from the profiling tools, we need to find a way to fix the symbol resolution issue without disabling optimizations.
I think the best place would be the "Building the engine" page. |
@pwasowski2 @swift-kim I agree too |
Ok, I'll go further down the rabbit hole and see how we can get all the symbols for profile builds ;) I'll update the wiki afterwards. |
I have investigated the problem a little bit more and have found out a way of resolving more symbols on First, look at this change draft of After applying pwasowski2@b9b44b9 and running a build with the following set of flutter/tools/gn \
--target-os linux \
--linux-cpu arm \
--no-goma \
--target-toolchain `pwd`/tizen_tools/toolchains \
--target-sysroot `pwd`/tizen_tools/sysroot/arm \
--target-triple armv7l-tizen-linux-gnueabi \
--runtime-mode profile \
--enable-fontconfig \
--embedder-for-target \
--disable-desktop-embeddings \
--build-tizen-shell we get more symbols in the profiler view. As you can see, many more symbols are resolved, but some of the I have tried increasing
In case, you're wondering, if setting gcc's
I think we can safely apply this pwasowski2@b9b44b9 to get almost all symbols, without setting @swift-kim, @bbrto21 what do you think about it? Edit: I've created a PR for enabling |
Thank you for the detailed analysis! The suggested change looks good to me, and I have a few quick questions:
And some doubts:
|
The last time I tried to use symbol_level, it only worked as expected with "//build/config:debug". of course, there is a slight performance penalty. diff --git a/build/config/BUILDCONFIG.gn b/build/config/BUILDCONFIG.gn
index 44c276c..70169f8 100644
--- a/build/config/BUILDCONFIG.gn
+++ b/build/config/BUILDCONFIG.gn
@@ -5,6 +5,9 @@
# define is_wasm
import("//build/toolchain/wasm.gni")
+# define enable_profiling
+import("//build/config/profiler.gni")
+
# =============================================================================
# PLATFORM SELECTION
# =============================================================================
@@ -369,7 +372,10 @@ if (is_clang) {
}
# Optimizations and debug checking.
-if (is_debug) {
+if (enable_profiling) {
+ _native_compiler_configs += [ "//build/config:debug" ]
+ _default_optimization_config = "//build/config/compiler:optimize"
+} else if (is_debug) {
_native_compiler_configs += [ "//build/config:debug" ]
_default_optimization_config = "//build/config/compiler:no_optimize"
} else {
@@ -382,7 +388,7 @@ _native_compiler_configs += [ _default_optimization_config ]
if (symbol_level == -1) {
# Linux is slowed by having symbols as part of the target binary, whereas
# Mac and Windows have them separate, so in Release Linux, default them off.
- if (is_debug || !is_linux) {
+ if (is_debug || !is_linux || enable_profiling) {
symbol_level = 2
} else if (is_asan || is_lsan || is_tsan || is_msan) {
# Sanitizers require symbols for filename suppressions to work. |
Thanks for feedback, I have tested proposed build configuration changes and here's what I've found:
It seems, the unresolved symbols don't come from Freetype. After removeing the
Yes, I have and unfortunately, it didn't help, too.
I have applied the diff to my repo and some symbols were still unresolved. When I have tested # Optimizations and debug checking.
-if (is_debug) {
+if (enable_profiling) {
+ _native_compiler_configs += [ "//build/config:debug" ]
+ _default_optimization_config = "//build/config/compiler:optimize"
+} else if (is_debug) { Update Here's the result of the same benchmark for |
One more benchmark, that was missing in my previous comment:
Adding @swift-kim, @bbrto21, I have made this PR ready for review #104. Could you please take a look at it? :) |
Looks good!, I think this issue is almost closed now. |
The problem is described in: #53 (comment)
The text was updated successfully, but these errors were encountered: