[Mono.Profiler.Log] Reverse managed backtrace in SampleHitEvent's
authorRodrigo Moya <rodrigo.moya@xamarin.com>
Fri, 8 Sep 2017 10:36:58 +0000 (12:36 +0200)
committerRodrigo Moya <rodrigo@gnome.org>
Thu, 14 Sep 2017 10:49:22 +0000 (12:49 +0200)
This comes in reverse order, compared to other backtraces in the MLPD, so
reverse it before sending it to visitors, so that it comes in the same
format as the rest of backtraces.

mcs/class/Mono.Profiler.Log/Mono.Profiler.Log/LogProcessor.cs

index 5da4229538f723c1c239cdbdcde3bc159b48547b..71bdca3f0dc1defe85366f1b7ba93cc4c373a101 100644 (file)
@@ -429,8 +429,8 @@ namespace Mono.Profiler.Log {
                                        }
                                        ev = new SampleHitEvent {
                                                ThreadId = ReadPointer (),
-                                               UnmanagedBacktrace = ReadBacktrace (true, false), // FIXME: isn't this reversed?
-                                               ManagedBacktrace = ReadBacktrace (true),
+                                               UnmanagedBacktrace = ReadBacktrace (true, false),
+                                               ManagedBacktrace = ReadBacktrace (true).Reverse ().ToArray (),
                                        };
                                        break;
                                case LogEventType.SampleUnmanagedSymbol: