Skip to content

Port GREF logging to .NET 6+ EventSource infrastructure #6822

@jonathanpeppers

Description

@jonathanpeppers

Android application type

Android for .NET (net6.0-android, etc.)

Affected platform version

.NET 6

Description

The .NET Podcast app shows dotnet trace output for:

image

https://github.com/xamarin/xamarin-android/blob/af2875138afada68a870cc803c3e8dcd2e85ff6f/src/Mono.Android/Android.Runtime/AndroidRuntime.cs#L178-L188

https://github.com/xamarin/xamarin-android/blob/af2875138afada68a870cc803c3e8dcd2e85ff6f/src/Mono.Android/Android.Runtime/AndroidRuntime.cs#L206-L211

This logging is almost always disabled, but we call into unmanaged code to increment an integer.

We could ideally port this logging to EventSource and do everything on the managed side -- avoid p/invoke for these.

Steps to Reproduce

Get dotnet trace output for an .NET 6 app.

Did you find any workaround?

No response

Relevant log output

No response

Metadata

Metadata

Labels

Area: App RuntimeIssues in `libmonodroid.so`.enhancementProposed change to current functionality.

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions