Inspections
-
- Posts: 35
- Joined: Tue Sep 12, 2006 12:55 pm
Inspections
Hi,
How do I create more inspections than those already given?
I can create more probes, but I dont think they do what I want.
Given a snapshot
1)
I want to be shown the java.lang.Strings where
len < buf.length/2
(e.i. wasting mem caused by substringing)
2)
I want to be shown objects having an int field variable in a specific range.
e.g. All objects that have a field "httpstatus" with a int value between 500 - 600.
Other fieldnames and ranges are also wanted, but less generic like "status" in range 40000-50000.
I know the snapshot should contain few or none of those objets.
Peter
How do I create more inspections than those already given?
I can create more probes, but I dont think they do what I want.
Given a snapshot
1)
I want to be shown the java.lang.Strings where
len < buf.length/2
(e.i. wasting mem caused by substringing)
2)
I want to be shown objects having an int field variable in a specific range.
e.g. All objects that have a field "httpstatus" with a int value between 500 - 600.
Other fieldnames and ranges are also wanted, but less generic like "status" in range 40000-50000.
I know the snapshot should contain few or none of those objets.
Peter
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Inspections
Hi Peter
There is no char array sharing anymore since Java 7 update 6. Each string has its own copy.
Best regards,
Anton
There is no API for adding new inspections by users. Please suggest them in the forum, and we'll consider implementing them.How do I create more inspections than those already given?
I guess that in your case (memory issues) they won't help.I can create more probes, but I dont think they do what I want.
Which Java version do you use?Given a snapshot
1)
I want to be shown the java.lang.Strings where
len < buf.length/2
(e.i. wasting mem caused by substringing)
There is no char array sharing anymore since Java 7 update 6. Each string has its own copy.
Unfortunately, such requests are impossible now. Perhaps we'll add an object query language or similar feature in the future.2)
I want to be shown objects having an int field variable in a specific range.
e.g. All objects that have a field "httpstatus" with a int value between 500 - 600.
Other fieldnames and ranges are also wanted, but less generic like "status" in range 40000-50000.
I know the snapshot should contain few or none of those objets.
Best regards,
Anton
-
- Posts: 35
- Joined: Tue Sep 12, 2006 12:55 pm
Re: Inspections
Which forum? This?There is no API for adding new inspections by users. Please suggest them in the forum, and we'll consider implementing them.How do I create more inspections than those already given?
1.5 and 1.6 in production and it will not change for a long time.Which Java version do you use? There is no char array sharing anymore since Java 7 update 6. Each string has its own copy.I want to be shown the java.lang.Strings where len < buf.length/2
(e.i. wasting mem caused by substringing)
Is it possible to see all objects extending a given object (fx. extending object HttpHeaderReply)?Unfortunately, such requests are impossible now. Perhaps we'll add an object query language or similar feature in the future.I want to be shown objects having an int field variable in a specific range.
e.g. All objects that have a field "httpstatus" with a int value between 500 - 600.
And then sort the objects using specific field?
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Inspections
Yes.Which forum? This?
We've dropped Java 5 support years ago. The latest profiler version which supported Java 5 was YourKit Java Profiler 8.0.x:1.5 and 1.6 in production and it will not change for a long time.
http://www.yourkit.com/download/older.html
Java 6 will reach its End of Life soon. We'll keep supporting it in the foreseeable future, but I'm afraid we can't spend time adding new features for Java 6 only.
Yes, by using Ctrl+N.Is it possible to see all objects extending a given object (fx. extending object HttpHeaderReply)?
There is no sort-by-field-value functionality in the existing UI. We can consider adding it.And then sort the objects using specific field?
-
- Posts: 35
- Joined: Tue Sep 12, 2006 12:55 pm
Re: Inspections
Ok.Anton Katilin wrote:Yes.Which forum? This?
Ok.Anton Katilin wrote:We'll keep supporting it in the foreseeable future, but I'm afraid we can't spend time adding new features for Java 6 only.
Ok ...Anton Katilin wrote:Yes, by using Ctrl+N.Is it possible to see all objects extending a given object (fx. extending object HttpHeaderReply)?
Ahh, half way there then. It would be cool if I could right click on field with a primitive type and sort by it.Anton Katilin wrote:There is no sort-by-field-value functionality in the existing UI. We can consider adding it.
I would not need the generic api then.
-
- Posts: 35
- Joined: Tue Sep 12, 2006 12:55 pm
Re: Inspections
Posting to an old thread;Anton Katilin wrote:There is no sort-by-field-value functionality in the existing UI. We can consider adding it.
Do you have any plans on adding a sort-by-field?
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Inspections
Hi,
Unfortunately, we don't have certain plans for this feature at the moment.
Best regards,
Anton
Unfortunately, we don't have certain plans for this feature at the moment.
Best regards,
Anton
-
- Posts: 35
- Joined: Tue Sep 12, 2006 12:55 pm
Re: Inspections
Do you have any other way of achieving? (This is wish from 2013 I still have, so there may have been added features I have not noticed)
So I have a number of instances of HttpOperations. They have a httpstatus field.
There are a lot of those; 1000+. I want to find those where something went wrong
and have a httpstatus of 500-600.
I am ok if I only get one instance at a time, but not ok if I have to expand 1000+ to find one.
So I have a number of instances of HttpOperations. They have a httpstatus field.
There are a lot of those; 1000+. I want to find those where something went wrong
and have a httpstatus of 500-600.
I am ok if I only get one instance at a time, but not ok if I have to expand 1000+ to find one.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Inspections
Would it make sense for you If we added an action to open instances with given field in given range, but without sorting which is more difficult to implement?
So you'd be able to extract HttpOperations having httpstatus within 500-600 by opening them in a new tab, but they'd be shown in the object explorer as they are shown now.
So you'd be able to extract HttpOperations having httpstatus within 500-600 by opening them in a new tab, but they'd be shown in the object explorer as they are shown now.
-
- Posts: 35
- Joined: Tue Sep 12, 2006 12:55 pm
Re: Inspections
Absolutely.
I dont need sorting, I just need to look at individual instances to check events for that instance.
However they are hard to find among 1000+ good ones.
I dont need sorting, I just need to look at individual instances to check events for that instance.
However they are hard to find among 1000+ good ones.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Inspections
We've implemented this internally. The first EAP build will contain the new action. I'll notify when it is available for download.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Inspections
Hi,
The EAP has started.
The new action is "Memory | Objects by Field Value... (Ctrl+Shift+F)". Please find detail in the change list: http://www.yourkit.com/eap
Best regards,
Anton
The EAP has started.
The new action is "Memory | Objects by Field Value... (Ctrl+Shift+F)". Please find detail in the change list: http://www.yourkit.com/eap
Best regards,
Anton
-
- Posts: 35
- Joined: Tue Sep 12, 2006 12:55 pm
Re: Inspections
I have tested, and it works. I have all I asked for here now.
I have 3 suggestions;
1) In object explorer when rmb on a field, I get a menu.
The menu have a sub menu called "Open Selection".
It would be nice if this new option was included,
so selecting it would open the "Find Objects by field value",
with the current selected field name and current value fill out.
2) The popup could be a bit nicer;
You should a least separate the inputbox for fieldname and values.
So have a least 2 inputboxes, 1 for fieldname, 1 for values.
I think 3 inputboxes would be preferable. field, min, max.
3) It could be a nice touch if the value could be an object index.
So I could search for "socket #134431".
I dont know if I (anyone) ever would need that.
I have 3 suggestions;
1) In object explorer when rmb on a field, I get a menu.
The menu have a sub menu called "Open Selection".
It would be nice if this new option was included,
so selecting it would open the "Find Objects by field value",
with the current selected field name and current value fill out.
2) The popup could be a bit nicer;
You should a least separate the inputbox for fieldname and values.
So have a least 2 inputboxes, 1 for fieldname, 1 for values.
I think 3 inputboxes would be preferable. field, min, max.
3) It could be a nice touch if the value could be an object index.
So I could search for "socket #134431".
I dont know if I (anyone) ever would need that.
-
- Posts: 6172
- Joined: Wed Aug 11, 2004 8:37 am
Re: Inspections
Hi,
Thank you for the suggestions. We've just released EAP build 12 that implements some of them.
1. If a primitive field is selected when the action is invoked, its name will be pre-selected.
We didn't add a popup menu item, but you can use the shortcut Ctrl+Shift+F.
2. There are two input fields now: field name and thresholds. We opted not to have separate fields for min and max to allow adding more complex comparisons in the future, not only min and max.
3. These indices are in fact random, they do not reflect any real object properties. It's just the object numeration inside the snapshot. The only purpose of showing it in the UI is to help users distinct objects with same properties (duplicates). I don't think it makes sense to search by this index. If you see an object with some particular index in any view you can always open that object in a new tab by using the "Open Selected Objects (F4)" action.
Best regards,
Anton
Thank you for the suggestions. We've just released EAP build 12 that implements some of them.
1. If a primitive field is selected when the action is invoked, its name will be pre-selected.
We didn't add a popup menu item, but you can use the shortcut Ctrl+Shift+F.
2. There are two input fields now: field name and thresholds. We opted not to have separate fields for min and max to allow adding more complex comparisons in the future, not only min and max.
3. These indices are in fact random, they do not reflect any real object properties. It's just the object numeration inside the snapshot. The only purpose of showing it in the UI is to help users distinct objects with same properties (duplicates). I don't think it makes sense to search by this index. If you see an object with some particular index in any view you can always open that object in a new tab by using the "Open Selected Objects (F4)" action.
Best regards,
Anton