-
Feature Request
-
Resolution: Done
-
Major
-
3.0.13, 4.0.5
-
None
There's a trigger for AT THROW; in a similar fashion let us instrument the places where a new object/array is created, since there's no constructor for array creation.
$@ should contain constructor parameters or dimensions of the created array
$! in AFTER should contain reference to the new object/array
$NEW should contain String with new object type/array element type
Motivation: I have tried to use Byteman to measure object allocation rate and locate these allocations, and I have managed to do that, though java.lang.Object and few other runtime classes cannot be detected in this way (e.g. CLASS java.lang.Object METHOD <init> AT ENTRY does not work, and when instrumenting java.lang.ref.Reference I get stack overflows). Now I'd like to detect array allocation, too, but it's not possible with Byteman currently.