Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1531)

Unified Diff: runtime/vm/profiler_service.cc

Issue 1410543011: Fix processing profiler samples in the presence of Thumb code. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: mod 2 Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/profiler_service.cc
diff --git a/runtime/vm/profiler_service.cc b/runtime/vm/profiler_service.cc
index 4e371794ca55f50128f9d594f34be0c78b54fef5..049a1980cd6d63b2dab93b98d23a5649c799af8d 100644
--- a/runtime/vm/profiler_service.cc
+++ b/runtime/vm/profiler_service.cc
@@ -1905,6 +1905,15 @@ class ProfileBuilder : public ValueObject {
0,
code);
}
+
+#if defined(HOST_ARCH_ARM)
zra 2015/10/30 18:28:31 We should probably check that __thumb__ or __thumb
rmacnak 2015/10/30 18:36:50 Other compilation units or dynamic libraries in ou
+ if ((native_start % 2) == 1) {
zra 2015/10/30 18:28:30 unconditionally: const uintptr_t one = 1; native_s
rmacnak 2015/10/30 18:36:50 Done.
Florian Schneider 2015/10/30 19:12:02 I'd 1U for unsigned literal one. Here however, sig
rmacnak 2015/10/30 19:48:51 ack
+ // The symbol for a Thumb function will be xxx1, but we may have samples
+ // at function entry which will have pc xxx0.
+ native_start -= 1;
+ }
+#endif
+
ASSERT(pc >= native_start);
ProfileCode* profile_code =
new ProfileCode(ProfileCode::kNativeCode,
@@ -1913,7 +1922,7 @@ class ProfileBuilder : public ValueObject {
0,
code);
profile_code->SetName(native_name);
- free(native_name);
+ NativeSymbolResolver::FreeSymbolName(native_name);
return profile_code;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698