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

rule-action macro for current class / method names

    XMLWordPrintable

Details

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

    Description

      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.)

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved: