From 3170e29ed85eeacb2f728c0c8f71a91cdc40dcf7 Mon Sep 17 00:00:00 2001 From: ivberg Date: Tue, 7 Nov 2023 14:06:45 -0800 Subject: [PATCH] Perfetto - Upgrade to latest Perfetto v38 and Protobuf 3.25.0 /w .pdb (#115) * Perfetto - Upgrade to latest Perfetto v38 and Protobuf 3.25.0 /w .pdb --- PerfettoCds/PerfettoCds.csproj | 5 +++-- PerfettoCds/pluginManifest.json | 2 +- PerfettoProcessor/PerfettoProcessor.csproj | 4 ++-- PerfettoUnitTest/PerfettoUnitTest.cs | 15 ++++++++------- PerfettoUnitTest/PerfettoUnitTest.csproj | 2 +- 5 files changed, 15 insertions(+), 13 deletions(-) diff --git a/PerfettoCds/PerfettoCds.csproj b/PerfettoCds/PerfettoCds.csproj index f378bd8..7b87890 100644 --- a/PerfettoCds/PerfettoCds.csproj +++ b/PerfettoCds/PerfettoCds.csproj @@ -16,7 +16,7 @@ - + true @@ -30,7 +30,7 @@ - + @@ -58,6 +58,7 @@ + diff --git a/PerfettoCds/pluginManifest.json b/PerfettoCds/pluginManifest.json index 4258351..59b9ea7 100644 --- a/PerfettoCds/pluginManifest.json +++ b/PerfettoCds/pluginManifest.json @@ -2,7 +2,7 @@ "$schema": "https://raw.githubusercontent.com/microsoft/microsoft-performance-toolkit-sdk/main/src/PluginsSystem/Tools/Microsoft.Performance.Toolkit.Plugins.Cli/Manifest/PluginManifestSchema.json", "identity": { "id": "Microsoft.Performance.Toolkit.Plugins.PerfettoPlugin", - "version": "1.5.4" + "version": "1.5.5" }, "displayName": "Perfetto for Android and Chromium logs", "description": "Perfetto Android & Chromium (CPU Scheduling, CPU Sampling, CPU Frequency, FTrace, Android Logs, Generic Events / Default Tracks, GPU Counters, Jank Detection, Processes, Android Packages) - https://perfetto.dev/", diff --git a/PerfettoProcessor/PerfettoProcessor.csproj b/PerfettoProcessor/PerfettoProcessor.csproj index ed7dc2a..fe9f136 100644 --- a/PerfettoProcessor/PerfettoProcessor.csproj +++ b/PerfettoProcessor/PerfettoProcessor.csproj @@ -2,7 +2,7 @@ netstandard2.1 - 1.5.1 + 1.5.5 true Microsoft Microsoft Corp. @@ -16,7 +16,7 @@ - + true diff --git a/PerfettoUnitTest/PerfettoUnitTest.cs b/PerfettoUnitTest/PerfettoUnitTest.cs index d621b9b..aeb53c5 100644 --- a/PerfettoUnitTest/PerfettoUnitTest.cs +++ b/PerfettoUnitTest/PerfettoUnitTest.cs @@ -119,7 +119,7 @@ public void TestAndroidTrace() Assert.IsTrue(cpuSchedEventData[0].ThreadName == "kworker/u17:9 (834)"); Assert.IsTrue(cpuSchedEventData[1].EndState == "Task Dead"); Assert.IsTrue(cpuSchedEventData[0].ProcessName == string.Empty); - Assert.IsTrue(cpuSchedEventData[5801].EndState == "Runnable"); + Assert.IsTrue(cpuSchedEventData[5801].EndState == "Runnable (Preempted)"); Assert.IsTrue(cpuSchedEventData[5801].ThreadName == "TraceLogApiTest (20855)"); Assert.IsTrue(cpuSchedEventData[5801].ProcessName == "TraceLogApiTest (20855)"); @@ -203,21 +203,22 @@ public void TestAndroid12Trace() PerfettoPluginConstants.ProcessEventCookerPath, nameof(PerfettoProcessEventCooker.ProcessEvents))); - Assert.IsTrue(processEventData.Count == 121); + Assert.IsTrue(processEventData.Count == 266); Assert.IsTrue(processEventData[1].AndroidAppId == 10135); Assert.IsTrue(processEventData[1].Uid == 10135); Assert.IsTrue(processEventData[1].CmdLine == "com.android.systemui"); - Assert.IsTrue(processEventData[1].ParentUpid == 25); + Assert.IsTrue(processEventData[1].ParentUpid == 158); Assert.IsTrue(processEventData[1].ParentProcess != null && processEventData[1].ParentProcess.Name == "zygote64"); Assert.IsTrue(processEventData[1].Pid == 980); Assert.IsTrue(processEventData[1].Upid == 1); Assert.IsTrue(processEventData[1].StartTimestamp == Timestamp.Zero); // NULL should be at trace start Assert.IsTrue(processEventData[1].EndTimestamp == new Timestamp(39446647558)); // NULL should be at trace stop - Assert.IsTrue(processEventData[119].StartTimestamp == new Timestamp(33970357558)); - Assert.IsTrue(processEventData[119].EndTimestamp == new Timestamp(34203203358)); - Assert.IsTrue(processEventData[119].ParentProcess != null && processEventData[119].ParentProcess.Name == "/apex/com.android.adbd/bin/adbd"); - UnitTest.TestTableBuild(RuntimeExecutionResults, PerfettoProcessTable.TableDescriptor, 121); + Assert.IsTrue(processEventData[264].StartTimestamp == new Timestamp(33970357558)); + Assert.IsTrue(processEventData[264].EndTimestamp == new Timestamp(34203203358)); + Assert.IsTrue(processEventData[264].ParentProcess != null && processEventData[264].ParentProcess.Name == "/apex/com.android.adbd/bin/adbd"); + Assert.IsTrue(processEventData[264].CmdLine == "/system/bin/sh -c cat /proc/10628/cmdline"); + UnitTest.TestTableBuild(RuntimeExecutionResults, PerfettoProcessTable.TableDescriptor, 266); // Packages var packagesList = RuntimeExecutionResults.QueryOutput>( diff --git a/PerfettoUnitTest/PerfettoUnitTest.csproj b/PerfettoUnitTest/PerfettoUnitTest.csproj index c2ae738..c37effc 100644 --- a/PerfettoUnitTest/PerfettoUnitTest.csproj +++ b/PerfettoUnitTest/PerfettoUnitTest.csproj @@ -29,7 +29,7 @@ - +