Quantcast
Channel: Common Language Runtime Internals and Architecture forum
Viewing all articles
Browse latest Browse all 1710

Injecting the Helper function call with a Condition ?

$
0
0

Hi,

I have a severe problem now. I need to handle the case where in a web request, few functions are being called more than a million times added together. 

SomeDotNetFunction()
{
//HelperFunc Enter Call
..
..
//helper Func Exit Call
}

The helper functions will again call the C++ functions to log. 

As my profiler injects two helper functions (one at entry and one for exit) there will be double the number of helper function calls that will again call my native function.

In such cases I am getting a massive overhead .

Is there any possible way to tell the SomeDotNetFunction() Not to call the helper functions when it's calls exceeds more than thousand..? 

I tried maintaining a map to count the number of function calls in both C++ and C#. Neither of the approaches works. It caused overhead only. I am sure that some one would have faced this similar case. 

I hope for a best solution.

./Selva


Viewing all articles
Browse latest Browse all 1710

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>