Fully featured low overhead profiler for Java EE and Java SE platforms.
Ultimate profiling and monitoring solution for Gradle, Maven, Ant, JUnit and TestNG.
Easy to use performance and memory profiler for .NET framework.

API

Moderators: Vladimir Kondratyev, Anton Katilin

Re: API

Postby Anton Katilin » Tue Apr 17, 2012 6:26 am

First question: do you profile the application itself (application #1 == application #2, as from my previous posts example) or a different application (application #1 != application #2)?

If it is the first case:

you do not need to set the port at all. The profiler agent will choose free port automatically. The controller's constructor with no parameters (new Controller()) will automatically find that port.

If it is the second case:

The port should be free, i.e. not used by another application. If 10002 is busy, try another one, e.g. 10005 or 10020. Instead of using startup-options.ini I would recommend to set YNP_STARTUP_OPTIONS environment variable instead, and to do it for the process #1 (the profiled one) only.

Anyway, could you please confirm whether your case is first or second, and I'll explain in more detail if necessary.
Anton Katilin
 
Posts: 5574
Joined: Wed Aug 11, 2004 8:37 am

Re: API

Postby jarbas » Tue Apr 17, 2012 11:58 am

My case is the second.

The application #1 != application #2
jarbas
 
Posts: 24
Joined: Fri Apr 13, 2012 1:20 pm

Re: API

Postby Anton Katilin » Tue Apr 17, 2012 4:44 pm

We will release next version in 1-2 days. Among other improvements there will be improvements in the API.
In particular, there will be Controller constructor which gets the profiled application's PID instead of port. This will simplify setup as it will not be needed anymore to hard code the port; the by-default chosen port will be OK.
Anton Katilin
 
Posts: 5574
Joined: Wed Aug 11, 2004 8:37 am

Re: API

Postby jarbas » Tue Apr 17, 2012 4:49 pm

Ok Anton,

Very good improvements. I will stay waiting this release.

Thank so much.
jarbas
 
Posts: 24
Joined: Fri Apr 13, 2012 1:20 pm

Re: API

Postby jarbas » Thu Apr 19, 2012 5:47 pm

Anton,

I atached an application with PID 2656 and have tried to create a new Controller like this:

Controller c = new Controller(2656);

Occurred the following error:

Process with PID=2656 does not exist or is not started with YourKit Profiler.

Notice that I have been to profiled this application before.
Mine application is Windows Service type.

Thanks.
jarbas
 
Posts: 24
Joined: Fri Apr 13, 2012 1:20 pm

Re: API

Postby Vladimir Kondratyev » Thu Apr 19, 2012 9:32 pm

YourKit .NET Profiler 7.0 was released today. Please download and try it http://www.yourkit.com/dotnet/download/
Vladimir Kondratyev
 
Posts: 1444
Joined: Tue Aug 10, 2004 7:52 pm
Location: Düsseldorf, Germany

Re: API

Postby jarbas » Fri Apr 20, 2012 12:05 pm

I'm had already using the version 7.0
jarbas
 
Posts: 24
Joined: Fri Apr 13, 2012 1:20 pm

Re: API

Postby Anton Katilin » Sun Apr 22, 2012 11:47 am

Process with PID=2656 does not exist or is not started with YourKit Profiler.

Have you started it with the profiler?
http://www.yourkit.com/docs/net70/help/ ... _local.jsp
http://www.yourkit.com/docs/net70/help/ ... manual.jsp

If yes, the profiler log file must be created. Does it exist? What is its content? Please change its location if you cannot find it:
http://www.yourkit.com/docs/net70/help/ ... jsp#logdir
Anton Katilin
 
Posts: 5574
Joined: Wed Aug 11, 2004 8:37 am

Re: API

Postby Anton Katilin » Sun Apr 22, 2012 1:07 pm

P.S.
Please also ensure that the profiler agent library is in the PATH of the process which calls Controller. Controller depends on some unmanaged code from it.

If you access the Controller from a 32-bit process, it is <profiler installation directory>\bin\win32\ynpagent.dll
If you access the Controller from a 64-bit process, it is <profiler installation directory>\bin\win64\ynpagent.dll

You can copy the file to the current directory if it is easier to do.
Anton Katilin
 
Posts: 5574
Joined: Wed Aug 11, 2004 8:37 am

Re: API

Postby jarbas » Mon Apr 23, 2012 12:46 pm

Anton Katilin wrote:
Process with PID=2656 does not exist or is not started with YourKit Profiler.

Have you started it with the profiler?
http://www.yourkit.com/docs/net70/help/ ... _local.jsp
http://www.yourkit.com/docs/net70/help/ ... manual.jsp

If yes, the profiler log file must be created. Does it exist? What is its content? Please change its location if you cannot find it:
http://www.yourkit.com/docs/net70/help/ ... jsp#logdir


Yes, I started with profiler.

The log exist. See part of the content:

[YourKit Profiler 6.0.1 for .NET] [0.061]:
OS: Windows 7 6.1
'C:\RM.Net\Bin\RM.Host.exe' started 19.1.2012 at 9:35
[YourKit Profiler 6.0.1 for .NET] [0.062]: Reading ignore list...
[YourKit Profiler 6.0.1 for .NET] [0.062]: File C:\Users\jarbas.carvalho\.ynp\config\.ignore2: not found
[YourKit Profiler 6.0.1 for .NET] [0.062]: Registry key HKLM\SOFTWARE\YNP: RegQueryValueEx failed for IGNORE_LIST with code 2
[YourKit Profiler 6.0.1 for .NET] [0.062]: Using default
[YourKit Profiler 6.0.1 for .NET] [0.063]: Reading startup options
[YourKit Profiler 6.0.1 for .NET] [0.063]: Environment variable YNP_STARTUP_OPTIONS: not defined
[YourKit Profiler 6.0.1 for .NET] [0.063]: File C:\Users\jarbas.carvalho\.ynp\config\startup-options.ini: disablealloc
[YourKit Profiler 6.0.1 for .NET] [0.521]: agent is listening on port 10001
[YourKit Profiler 6.0.1 for .NET] [0.575]: setTriggers:

[YourKit Profiler 6.0.1 for .NET] [0.575]: setTriggers: OK
[YourKit Profiler 6.0.1 for .NET] [3.685]: Shutting down...
7.0.0 - 0.020: Command line:
jarbas
 
Posts: 24
Joined: Fri Apr 13, 2012 1:20 pm

Re: API

Postby jarbas » Mon Apr 23, 2012 12:48 pm

Anton Katilin wrote:P.S.
Please also ensure that the profiler agent library is in the PATH of the process which calls Controller. Controller depends on some unmanaged code from it.

If you access the Controller from a 32-bit process, it is <profiler installation directory>\bin\win32\ynpagent.dll
If you access the Controller from a 64-bit process, it is <profiler installation directory>\bin\win64\ynpagent.dll

You can copy the file to the current directory if it is easier to do.


Yes, the file ynpagent.dll exists in this path for 32-bit process.
jarbas
 
Posts: 24
Joined: Fri Apr 13, 2012 1:20 pm

Re: API

Postby Anton Katilin » Mon Apr 23, 2012 1:09 pm

Please note that the log says the application starts with version 6, not with 7.
Please uninstall version 6 before installing version 7 to avoid loading of a wrong agent.
Anton Katilin
 
Posts: 5574
Joined: Wed Aug 11, 2004 8:37 am

Re: API

Postby jarbas » Mon Apr 23, 2012 2:01 pm

Strange because I removed the old version using the installer YourKit-Profiler-7.0.0-for-.NET.exe and through of windows panel control and the application continue saving the log like version 6.0.1 for .NET.
jarbas
 
Posts: 24
Joined: Fri Apr 13, 2012 1:20 pm

Re: API

Postby Anton Katilin » Mon Apr 23, 2012 2:17 pm

Have you manually copied ynpagent.dll from the v6 directory to another directory?
Please search all your disks for ynpagent.dll and ensure no copy of v6's agent remains.
Anton Katilin
 
Posts: 5574
Joined: Wed Aug 11, 2004 8:37 am

Re: API

Postby jarbas » Mon Apr 23, 2012 6:38 pm

I removed the yourkit, all the folders and files and reinstall it again but the log continue saving with the old version.

2012-01-17 16:46:18.955 0 +0 INFO com.yourkit.Main0 :
---------------------------------------------------------------------
Product: YourKit Profiler 6.0.1 for .NET
Build: 6006 on Mon Nov 21 15:56:00 BRST 2011
JDK: 1.6.0_27
VM: Java HotSpot(TM) Client VM
Vendor: Sun Microsystems Inc.
OS: Windows 7
OS version: 6.1
OS arch: x86

I will try in another machine.
jarbas
 
Posts: 24
Joined: Fri Apr 13, 2012 1:20 pm

PreviousNext

Return to .NET Profiler

Who is online

Users browsing this forum: No registered users and 1 guest