diff options
author | Radek Doulik <radekdoulik@users.noreply.github.com> | 2019-06-25 13:17:45 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2019-06-25 13:17:45 +0300 |
commit | 858b2b8405407770c131c1519a2fa889f796577f (patch) | |
tree | b136cf22d0cd42fc204bf65db3db0c7f1e46e9a6 /msvc | |
parent | f8fbbcf280ca9a55ffe573681ad44abadf804592 (diff) |
[aot profiler] Listen for commands on given port (#14936)
* [aot profiler] Listen for commands on given port
Extended the aot profiler so, that it can receive commands over the network.
Added new option `port=PORT`, which enables command server and specifies
the port the server should listen at.
We have 2 commands so far.
save ... save the profile data to socket and close it
quit ... quit the profiler. it also saves the profile to the file
in case the output option was specified.
It makes the aot profiling much easier to use on Android as we don't need to
save the profile to a file on the device. That means we don't need to set
`<application android:debuggable="true"/>` flag, which changes the Android
app behavior and thus influence the profile itself. It is also convenient way
for IDEs to retrieve the aot profiles.
Example use for Xamarin.Android. Save and receive the profile data:
adb shell setprop debug.mono.profile aot:verbose,port=9999
adb forward tcp:9999 tcp:9999
nc -v 127.0.0.1 9999 > profile.aotprof
found 0 associations
found 1 connections:
1: flags=82<CONNECTED,PREFERRED>
outif lo0
src 127.0.0.1 port 50398
dst 127.0.0.1 port 9999
rank info not available
TCP aux info available
Connection to 127.0.0.1 port 9999 [tcp/distinct] succeeded!
save
Check what we received:
aotprofile-tool -sd profile.aotprof
Modules:
132475FF-85AA-430D-913C-7642CBD8587E mscorlib
F7BDCAB5-83D3-4A0A-A33D-BBE94284667D Mono.Android
22897151-27C9-4064-B001-8A04F5847812 System
AA3FC224-D486-4304-A8C9-EBF316556B26 Java.Interop
00D98403-051B-4168-A391-F3F601637CBD System.Core
FD06519A-C321-426C-BDD8-C97777452057 xat_latests_and_greatest_vsmac_8._1
9ECB003E-D449-438B-BE35-58810DCBC917 Xamarin.Android.Support.v7.AppCompat
11659962-EFAC-400D-9F8D-AF925B26AE41 Xamarin.Android.Support.Fragment
48C436F7-611D-470D-9949-AC13FFDCF613 Xamarin.Essentials
2792D10D-7E13-46E6-BB4A-933C25635F48 Xamarin.Android.Support.Design
Summary:
Modules: 10
Types: 221
Methods: 932
* Try to fix WIN32 compilation
* Add helper.c to mono-profiler-log.vcxproj
* Add helper.c to mono-profiler-log.vcxproj.filters as well
Diffstat (limited to 'msvc')
-rw-r--r-- | msvc/mono-profiler-log.vcxproj | 1 | ||||
-rw-r--r-- | msvc/mono-profiler-log.vcxproj.filters | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/msvc/mono-profiler-log.vcxproj b/msvc/mono-profiler-log.vcxproj index f745c7381eb..0f8057af3eb 100644 --- a/msvc/mono-profiler-log.vcxproj +++ b/msvc/mono-profiler-log.vcxproj @@ -154,6 +154,7 @@ </ProjectReference> </ItemDefinitionGroup> <ItemGroup> + <ClCompile Include="..\mono\profiler\helper.c" /> <ClCompile Include="..\mono\profiler\log-args.c" /> <ClCompile Include="..\mono\profiler\log.c" /> </ItemGroup> diff --git a/msvc/mono-profiler-log.vcxproj.filters b/msvc/mono-profiler-log.vcxproj.filters index 662a0050d36..fbc769d7e1d 100644 --- a/msvc/mono-profiler-log.vcxproj.filters +++ b/msvc/mono-profiler-log.vcxproj.filters @@ -12,6 +12,9 @@ </Filter> </ItemGroup> <ItemGroup> + <ClCompile Include="..\mono\profiler\helper.c"> + <Filter>Source Files</Filter> + </ClCompile> <ClCompile Include="..\mono\profiler\log.c"> <Filter>Source Files</Filter> </ClCompile> |