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

rule-action macro for current class / method names

XMLWordPrintable

    • Icon: Feature Request Feature Request
    • Resolution: Done
    • Icon: Major Major
    • 2.1.3
    • None
    • None
    • None

      It would be nice if the action/expression language allowed use of a built-in or $macro that would expand to a string literal that describes the context of the execution site of the injected action. These macros could be expanded at injection time rather than at run time, eschewing unwinding. With them, a rule pair vaguely like this could enable lightweight callgraph tracing:

      RULE foo_entry
      CLASS ^foo
      METHOD bar()
      AT ENTRY
      DO SOME_PRINT_THING($class, $method, "entered")
      ENDRULE

      RULE foo_exit
      CLASS ^foo
      METHOD bar()
      AT EXIT
      DO SOME_PRINT_THING($class, $method, "exited")
      ENDRULE

      (Maybe a textualized $macro of the AT <event> field could further compact things.)

              rhn-engineering-adinn Andrew Dinn
              rhtorsys Frank Eigler
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Created:
                Updated:
                Resolved: