Profiling API
Is there any timeframe on a profiling API? Are there any public design docs available at this point?
Greg
ICorProfiler profiling APIs are available in CoreCLR (on Windows, on Unix - not yet). They work same as in the full .NET Framework. The main difference is that the environment variables to setup the profiler have CoreClr_ prefix to avoid colliding with the full .NET Framework (ie CORECLR_ENABLE_PROFILING, CORECLR_PROFILER_PATH for CoreCLR vs. COR_ENABLE_PROFILING, COR_PROFILER_PATH for full .NET Framework).
Are you looking for anything particular?
Do you know why *_PROFILER_PATH doesn't come in 32 and 64 bit versions - it limits this feature as the processes being profiled could be a combination of both but you can only register one.
32-bit vs. 64-bit profiler path: It is a good suggestion. Could you please open a separate issue for it?
I've opened dotnet/coreclr#601 to track the suggestion by @sawilde.
@gregoryyoung do you have enough information or are there other specific's you'd like?
Alright, I'm closing this down. Let me know if that was in error.
@jkotas You mention that the Profiling API is already available on Windows, but not yet on Unix. Is it the plan to provide this API (or something similar) on all platforms in the future?
If I am not mistaken, this API is what the guys over at NewRelic are missing in order to instrument .NET apps on non-Windows hosts. For reference: https://docs.newrelic.com/docs/agents/net-agent/getting-started/new-relic-net#app-frameworks
We are basically in the same boat.
On Thu, Jun 4, 2015 at 5:03 PM, Jørn Schou-Rode [email protected] wrote:
@jkotas https://github.com/jkotas You mention that the Profiling API is already available on Windows, but not yet on Unix. Is it the plan to provide this API (or something similar) on all platforms in the future?
If I am not mistaken, this API is what the guys over at NewRelic are missing in order to instrument .NET apps on non-Windows hosts. For reference: https://docs.newrelic.com/docs/agents/net-agent/getting-started/new-relic-net#app-frameworks
— Reply to this email directly or view it on GitHub https://github.com/dotnet/coreclr/issues/445#issuecomment-108908467.
Studying for the Turing test
This issue should not have been closed. Yes, we should enable the profiling APIs on Unix to support the ecosystem of tools build on top of them going cross-plat. We are aiming for as much parity as possible for the runtime capabilities across platforms.
cc @sergiy-k @mikem8361 @noahfalk
I've begun to work on this a bit. You can track my progress (or tell me that I'm doing something terrible) at https://github.com/david-mitchell/coreclr/tree/enable-profiling
:+1:
On Wed, Jul 15, 2015 at 5:56 PM, David Mitchell [email protected] wrote:
I've begun to work on this a bit. You can track my progress (or tell me that I'm doing something terrible) at https://github.com/david-mitchell/coreclr/tree/enable-profiling
— Reply to this email directly or view it on GitHub https://github.com/dotnet/coreclr/issues/445#issuecomment-121678593.
Studying for the Turing test
:+1:
Thanks @david-mitchell ! Last I heard a new coworker here at msft will looking at this area soon (he is still in process of transferring teams). In the meantime feel free to reach out to me for any questions, feedback, PRs, etc.
I've got the Profiling API building on OS X (haven't tried Linux yet), and I've created a proof-of-concept profiler at https://github.com/david-mitchell/CoreCLRProfiler
Just my .02 I actually prefer the mono model on this one. It is far easier to comprehend than transporting the windows model.
@gregoryyoung the MS Profiling API has a number of features that are not present in mono's profiler. The New Relic profiler, for example, could not be built on top of Mono's Profiling API as it exists today. (see https://github.com/david-mitchell/NewRelicProfiler for more information on this)
@david-mitchell - all I see is code, no details on the issues - perhaps you could expand more (even if you put it in the wiki).
As @gregoryyoung says the mono approach does seem much cleaner (once you get past the low documentation footprint) than the windows COM way; all that constant querying via COM interfaces (I know I've done my fair share of it) is awfully tedious.
I'd be interested to know where the gaps were when/if I decide to go ahead on the mono version of OpenCover.
The main issue is that the MS version of the API supplies for method rewriting—along with provisions for allocating memory to be used for this purpose and other related functionality—which mono does not.
In any case, the COM API already exists in CoreCLR, and there are advantages to supporting it—for example, porting existing Windows profilers to OS X/Linux should be much easier if a similar API is preserved.
Basically this boils down to rejit, which is a big thing for profiler vendors. No?
Basically this boils down to rejit, which is a big thing for profiler vendors. No?
Nope, looked into it but in the end never really found a need for it - can't talk for the commercial guys but I've yet to see any code in the open-source community that used it outside just exploratory testing. If however is @david-mitchell says there is no way to rewrite a method (I just assumed the profilers in the Open Source space had never needed to and so no obvious code sample) then that is a bit of a downer.
TypeMock does rejit, using the profiler API, IIRC.
*Hibernating Rhinos Ltd *
Oren Eini* l CEO l *Mobile: + 972-52-548-6969
Office: +972-4-622-7811 *l *Fax: +972-153-4-622-7811
On Sat, Jul 18, 2015 at 9:34 AM, Shaun Wilde [email protected] wrote:
Basically this boils down to rejit, which is a big thing for profiler vendors. No?
Nope, looked into it but in the end never really found a need for it - can't talk for the commercial guys but I've yet to see any code in the open-source community that used it outside just exploratory testing. If however is @david-mitchell https://github.com/david-mitchell says there is no way to rewrite a method (I just assumed the profilers in the Open Source space had never needed to and so no obvious code sample) then that is a bit of a downer.
— Reply to this email directly or view it on GitHub https://github.com/dotnet/coreclr/issues/445#issuecomment-122498114.