Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / CLR / May 2004

Tip: Looking for answers? Try searching our database.

Profiler API questions

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Anthony Novak - 10 May 2004 16:46 GMT
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.111111111111
Called 200 child function
Leave x at 12:20:1.99999999999

that x actually took .8 to run or am i actually timing a whole bunch of interactions with the profiler that are sqewing my results

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 Regard

Anthony Novak
Brian Tyler - 10 May 2004 21:53 GMT
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
Anthony Novak - 10 May 2004 22:21 GMT
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

Rate this thread:







Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.