dotnet / dotnet/android

Port GREF logging to .NET 6+ EventSource infrastructure

Open
#6,822 3 comments 0 reactions 1 assignee Assigned to @jonathanpeppers View on GitHub
Area: App Runtime enhancement
Dominant language
C#
Stars
2.1k
Forks
579
Avg merge
1d 19h
Merged PRs (30d)
252

Description

### 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://user-images.githubusercontent.com/840039/157499696-248942b8-73c7-43d3-8b5e-b741d41792cb.png)

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_

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.