Uploaded image for project: 'Byteman'
  1. Byteman
  2. BYTEMAN-281

Add (AT|AFTER) (NEW|NEWARRAY|NEWMULTIARRAY) trigger location

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 3.0.14, 4.0.6
    • 3.0.13, 4.0.5
    • Trigger Injection
    • 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.

              rhn-engineering-adinn Andrew Dinn
              rvansa1@redhat.com Radim Vansa (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

                Created:
                Updated:
                Resolved: