Attach to .NET4 process gives no relevant information

Code profiling for .NET developers.

Moderators: AndrewH, melvyn.harbour, james.billings, Laura Morley, dene.boulton

Attach to .NET4 process gives no relevant information

Postby luismiguelfilipe » Wed Jul 25, 2012 4:47 pm

I am attaching the Profiler to an already running .NET4 process.

I do some stuff in my application and then i stop the profiler.
When i analyze the data only two methods from my application show up. I expected more methods to be profiled!

Furthermore, Database info is retrieved.

It looks like the profiler is running in Sampling Mode.

If this is the problem, how can i configure it to run in different mode when choosing "Attach to .NET4 process"

I am using the 7.3 Trial Version.

Best regards,
Luís Filipe
luismiguelfilipe
 
Posts: 3
Joined: Wed Jul 25, 2012 4:42 pm

Postby james.billings » Wed Jul 25, 2012 6:36 pm

Hi,
The "Attach to process" option is only equivalent to sampling mode. For the more detailed method or line level options, you need to let the profiler start those processes directly.
james.billings
 
Posts: 1144
Joined: Wed Jun 16, 2010 11:10 am
Location: My desk.

Re:

Postby luismiguelfilipe » Thu Jul 26, 2012 9:12 am

james.billings wrote:Hi,
The "Attach to process" option is only equivalent to sampling mode. For the more detailed method or line level options, you need to let the profiler start those processes directly.


Thank you for your reply.

I would like to profile an application that is launched by a mobile via terminal server.

As far as I can see there is no way for the profiler to launch it.

Out of curiosity, there is only the sampling mode available by design or is it a limitation?

Furthermore, I believe the application could warn the user that by choosing "Attach to Process" it will be profiled in Sampling Mode.
luismiguelfilipe
 
Posts: 3
Joined: Wed Jul 25, 2012 4:42 pm

Postby dene.boulton » Thu Jul 26, 2012 10:12 am

Hello,

Attach to .Net4 Process using Sampling mode for profiling is a limitation I am afraid, it is no by design.

You may of already attempted the following advice since you are now using the Attach to Process option - which is generally considered a more advanced use-case.

You will need to have desktop (rdp) access to the terminal server session where your application is going to be run.
Using the profiler start/profile the application so that it is running and then any interaction with the application from the mobile is then profiled. It may be necessary to run the profiler as Admin.

Generally speaking an application running on terminal server is not aware of how it is hosted, so the same type of workflow detailed above could be run on a regular development desktop. Unless of course there is something specific about the hosting environment you are wanting to take into account.
Dene Boulton
Red Gate
dene.boulton
 
Posts: 53
Joined: Wed Oct 12, 2011 12:44 pm
Location: Cambridge

Postby luismiguelfilipe » Thu Jul 26, 2012 11:20 am

thank you dene.boulton. I will take your option into account.

By reading this link
http://www.red-gate.com/supportcenter/C ... to_process
one gets the idea that can profile it with different levels of depth.

Redgate should review the above link, especially the last paragraph

If you need to save results for analysis later, attaching ANTS Performance Profiler to a running process means that you can save just the results you need, helping to reduce the size of the results file. This is particularly useful for line-level timings for all methods.
luismiguelfilipe
 
Posts: 3
Joined: Wed Jul 25, 2012 4:42 pm

Postby dene.boulton » Thu Jul 26, 2012 11:47 am

You are welcome, and thank you for pointing that out.
Dene Boulton
Red Gate
dene.boulton
 
Posts: 53
Joined: Wed Oct 12, 2011 12:44 pm
Location: Cambridge


Return to ANTS Performance Profiler 7

Who is online

Users browsing this forum: No registered users and 0 guests