There are simple changes that can be done to
UdonBehavior.cs
that will enable full compatibility with the Unity Profiler. Please consider adding this to the SDK for use by developers.
Attached are screenshots of 2 separate scripts and the resulting Profiler view with the changes I am referring to implemented.