FEATURE REQUEST: Ability to get caller information in optimized (release) builds

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi,

It would be nice to get the caller of a method (just for information
purposes) in optimized builds that can reliabily account for inlining.
Currently I am using the call stack but with inlining this is not guranteed
to be accurate unless I use debug (unoptimized builds) but I wish to have
this in release builts also.


Thanks.
 
It would be nice to get the caller of a method (just for information
purposes) in optimized builds that can reliabily account for inlining.
Currently I am using the call stack but with inlining this is not guranteed
to be accurate unless I use debug (unoptimized builds) but I wish to have
this in release builts also.

You can mark your method with

[MethodImpl(MethodImplOptions.NoInlining)]

to prevent if from being inlined.



Mattias
 
That would affect the performance then wouldnt it.


Mattias Sjögren said:
It would be nice to get the caller of a method (just for information
purposes) in optimized builds that can reliabily account for inlining.
Currently I am using the call stack but with inlining this is not guranteed
to be accurate unless I use debug (unoptimized builds) but I wish to have
this in release builts also.

You can mark your method with

[MethodImpl(MethodImplOptions.NoInlining)]

to prevent if from being inlined.



Mattias
 
That would affect the performance then wouldnt it.
More than likely, your feature request would as well.
Mattias Sj$B‹H(Bren said:
It would be nice to get the caller of a method (just for information
purposes) in optimized builds that can reliabily account for inlining.
Currently I am using the call stack but with inlining this is not guranteed
to be accurate unless I use debug (unoptimized builds) but I wish to have
this in release builts also.

You can mark your method with

[MethodImpl(MethodImplOptions.NoInlining)]

to prevent if from being inlined.



Mattias
 
Back
Top