Red Gate forums :: View topic - How to hide source for methods
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
ANTS Performance Profiler 7
ANTS Performance Profiler 7 forum

How to hide source for methods

Search in ANTS Performance Profiler 7 forum
Post new topic   Reply to topic
Jump to:  
Author Message
kellystuard



Joined: 29 May 2012
Posts: 6

PostPosted: Tue May 29, 2012 7:05 pm    Post subject: How to hide source for methods Reply with quote

I have a large code base that takes advantage of AOP (aspect oriented programming). I would like to hide the impact of a particular method.

As I'm currently showing just "Methods with source", I'm hoping there's some way to compile my solution such that the profiler cannot find the source for that particular project. I've attempted compiling just that project in release mode, to no avail.
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Tue May 29, 2012 7:48 pm    Post subject: Reply with quote

Thanks for your post.

It's an interesting one this - usually people are concerned when the Profiler *can't* find their source code!

There's no option I can think of to not show source for any specific method.

The Profiler utilises the PDB's to try to locate the source, so removing these may help - but that's global to each assembly rather than giving you any level of control, and in any case, the latest version offers integrated decompilation so you could reconstruct the source even where it not available anywhere (useful for 3rd party DLLs for example)
Back to top
View user's profile Send private message
kellystuard



Joined: 29 May 2012
Posts: 6

PostPosted: Tue May 29, 2012 8:34 pm    Post subject: Reply with quote

Indeed. I'm sure mine's not the normal case. I'm mainly just interested as it showing up as: "Collapsed methods without source. To view these methods, [blah, blah]".

Building in release mode took care of the .pdb file not being built, anymore. Even with that, it's still showing the source. It's not just showing the decompiled source; it's showing the source code (with comments, and everything).

I was under the impression that with no .pdb files, it would treat it as it would any other 3rd-party dll (e.g. NHibernate). However, it's somehow being really smart (good for it; bad for me) in locating the source files.
Back to top
View user's profile Send private message
kellystuard



Joined: 29 May 2012
Posts: 6

PostPosted: Tue May 29, 2012 8:40 pm    Post subject: Reply with quote

So somehow it's figuring out where the source code is located. Perhaps the dll has references to where it was compiled.

I renamed the folder that the project is in and re-ran the profiler. Now the profiler doesn't list the methods in the project.

I appreciate the tenacity of the profiler when it goes to find source. I would appreciate it more if I could tell it to ignore certain items. Now that I can "hack" to tell it not to look at something, it's not such a big deal. It would be a great feature to add, though.
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Tue May 29, 2012 8:42 pm    Post subject: Reply with quote

I don't think we cache the PDB's anywhere - but if there's a copy in your PATH anywhere, or they've been added to the GAC somehow it'll probably still find them. Also if you're profiling directly from the build output it /may/ (I'd need to check) automatically find the source code there.

What kind of application is it?
Back to top
View user's profile Send private message
kellystuard



Joined: 29 May 2012
Posts: 6

PostPosted: Tue May 29, 2012 8:52 pm    Post subject: Reply with quote

It's a solution with a web application project and quite a few class library projects.

So it was compiled in [say] F:\source and installed to [say] C:\Inetpub\dest.

Profiling settings are:
"ASP.NET web application (IIS)"
ASP.NET web application (URL): "http://www.example.com/"
Profile on: "Original Port (IIS will restart)"

Hitting a method that it can find source for gives [say] the following:
F:\source\classlibrary\foo.cs

This happens for both dll's that have associated pdb's and those that don't. The only way [I've found] to stop that is to delete the original source directory. If i were a betting man, I'd say that one of the dll's with pdb's is storing the path to the non-pdb'd one.
Back to top
View user's profile Send private message
james.billings



Joined: 16 Jun 2010
Posts: 1116
Location: My desk.

PostPosted: Tue May 29, 2012 8:54 pm    Post subject: Reply with quote

I guess that's possible - you could always open up one of the remaining PDB files and see if you can spot it referenced anywhere (some source code paths appear in plain text for some of mine...)
Back to top
View user's profile Send private message
kellystuard



Joined: 29 May 2012
Posts: 6

PostPosted: Tue May 29, 2012 9:08 pm    Post subject: Reply with quote

Nope. Nothing references this project, directly (AOP). I grep'd the pdb's and, while there are other references, none to the dll in question.

I'm just going to go with profiler being relly smart. If it's of interest to your group, I can put together a minimalist example. Otherwise, I'm going to go on with my life.
Back to top
View user's profile Send private message
dene.boulton



Joined: 12 Oct 2011
Posts: 53
Location: Cambridge

PostPosted: Tue May 29, 2012 10:41 pm    Post subject: Reply with quote

Hello,

The current Early Access Program (EAP) builds for the Performance Profiler implement filtering that can be defined by the user.
When viewing the Call-Tree or Method Grid, right-click on a method and the context menu will show some options for defining filters (e.g. Show Only Blah, Hide BlahFoo).

The EAP page is here: http://help.red-gate.com/help/ANTSPerformanceProfiler/download_eap.html

Hope this helps.
_________________
Dene Boulton
Red Gate
Back to top
View user's profile Send private message Send e-mail
kellystuard



Joined: 29 May 2012
Posts: 6

PostPosted: Tue May 29, 2012 10:59 pm    Post subject: Reply with quote

That's exciting! I'll check it out.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group