Skip to content

Add a trace option that counts executed opcodes #1351

@SamWilsn

Description

@SamWilsn

See ipsilon/evmone#1274 for an implementation.

The general shape of this interface is:

  • Add a t8n command line argument --opcode.count <file-name>.
  • Save a JSON blob to the given file containing the number of times each instruction is executed.

Sample JSON:

{
  "STOP": 1,
  "ADD": 1,
  "MOD": 1,
  "EQ": 1,
  "CALLER": 1,
  "CALLDATALOAD": 1,
  "TIMESTAMP": 2,
  "SSTORE": 2,
  "JUMPI": 1,
  "JUMPDEST": 1,
  "PUSH0": 2,
  "PUSH1": 2,
  "PUSH3": 2,
  "PUSH20": 1,
  "DUP2": 1,
  "SWAP1": 1,
  "RETURN": 1
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-toolArea: toolingC-enhanceCategory: a request for an improvementE-easyExperience: easy, good for newcomers

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions