eclipse-openj9 / openj9-utils

Other
16 stars 29 forks source link

Implement methodExit event in perf agent #52

Closed mpirvu closed 3 years ago

mpirvu commented 3 years ago

This event is very much similar to the MethodEnter event. Example of commands to enable/disable:

  {
    "functionality": "methodExitEvents",
    "command": "start",
    "delay": 1,
    "stackTraceDepth": 3
  },
  {
    "functionality": "methodExitEvents",
    "command": "stop",
    "delay": 3
  }

Example of output:

{
  "body": {
    "methodClass": "Ljava/lang/String;",
    "methodName": "lengthInternal",
    "methodNum": 5908,
    "methodSig": "()I",
    "stackTrace": [
      {
        "class": "Ljava/lang/String;",
        "method": "lengthInternal",
        "signature": "()I"
      },
      {
        "class": "Ljava/lang/String;",
        "method": "length",
        "signature": "()I"
      },
      {
        "class": "Ljava/lang/String;",
        "method": "indexOf",
        "signature": "(Ljava/lang/String;I)I"
      }
    ]
  },
  "eventType": "methodExitEvent",
  "from": "Server",
  "timestamp": 1616194905999605293
},

Signed-off-by: Marius Pirvu mpirvu@ca.ibm.com

mpirvu commented 3 years ago

@dsouzai Could you please review this PR? Thanks