First off, what do you mean by suspect components? If it is a public web
service I assume that means you don't have access to the code or servers to
see what is going on there. So what do you mean? Do you mean the HTTP
request took 3 seconds or it took 3 seconds from the time "you pushed a
button" until "something was displayed"?
1. If you have enabled the method enter/exit callbacks then your measurement
for x is a whole lot of CLR infrastructure also. So, x did take .888888...
to run including the children and various callbacks.
2. While I have not used the function mapper of the profiler myself, I can
pass along a couple of things. The two callbacks you receive are for the two
checks the JITer makes (one for entry, one for exit - there is actual a
third for tailcall exits but that isn't very common). Second, I have not had
any trouble getting information about the method, its class/module/assembly,
etc from the very first line of JITCompilationStarted. You should be able to
do what you are after with this.
> Hi Folks,
>
> I have 2 questions regarding the clr profiling api. I am using the gcp_profiler sample as the basis for the questions. Using ver 1.1 of
runtime, vc7.
> Background:
>
> I am working on a project with a public web service interface. This interface is called by a client program. We have tracked some performance
issues down to being within the web service code. As far as timing a
requests, we rely on the timing information collected by the client. So when
a client says a request takes 3 seconds, i would like to know what part of
that 3 seconds is spent in the suspect components. This info is not usually
available in the comercial profilers i have seen, as they summarise the data
for many requests into a single record identifying busy components /
classes.
> Questions:
>
> 1. When hooking the profiling api with a modified version of the gcp_profiler, my program obvoiusly runs far slower, as expected, but is it
incorrect to say:
> Function x entered at 12:20:1.1111111111111
> Called 200 child functions
[quoted text clipped - 3 lines]
>
> 2. The callback requested via the SetFunctionIDMapper() method can request that the Enter and Leave methods for a functon not be invoked. My guess is,
that this saves time / improves the speed of the profiler. I am basing my
decision on wether i want timing information on the "namespace.class" value
that the function belongs to. The callback seems to occur twice between
JITCompilationStarted and JITCompilationFinished. My problem is, that
apparently the function metadata is not available until after
JITCompilationFinished, so i cant use that callback to check the name of the
"namespace.class" to disable enter/leave callbacks to that function. Is
there another way of handling this?
> Many Regards
>
> Anthony Novak
Hi Brian,
Thanks for the info. Just to answer your question, i guess i meant to say: We are having problems with a web service we have written in house that consumes third party components. It exposes its services publicly through the SOAP paradigm.
I had not tried to look up the function info between JITCompilationStarted and JITCompilationFinished as the docs say that the functionID is not guarenteed to be valid until Finished. Will give it a go.
Many Thanks
Anthony Novak