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

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

    XMLWordPrintable

    Details

      Description

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                adinn Andrew Dinn
                Reporter:
                rvansa Radim Vansa
              • Votes:
                0 Vote for this issue
                Watchers:
                6 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: