Project

General

Profile

Actions

Task #12629

open

Получить трассу исполнения байт-кода для JVM

Added by Alexander Protsenko 8 months ago.

Status:
New
Priority:
Normal
Assignee:
Category:
VM Trace
Target version:
Start date:
09/13/2023
Due date:
% Done:

0%

Estimated time:
Detected in build:
git
Published in build:

Description

Найти возможность получать трассу исполнения байт-кода (поиск по ключевому слову -XX:+TraceBytecodes).

Можно посмотреть инструмент: https://cr.openjdk.org/~redestad/bytestacks/bytecode-startup-analysis.html

Пример трассы для RISCV:

core   0: 0x0000000000001000 (0x00000297) auipc   t0, 0x0
core   0: 0x0000000000001004 (0x02028593) addi    a1, t0, 32
core   0: 0x0000000000001008 (0xf1402573) csrr    a0, mhartid
core   0: 0x000000000000100c (0x0182b283) ld      t0, 24(t0)
core   0: 0x0000000000001010 (0x00028067) jr      t0
core   0: 0x0000000080000000 (0x0000a091) c.j     pc + 68
core   0: 0x0000000080000044 (0xf1402573) csrr    a0, mhartid
core   0: 0x0000000080000048 (0x0000e101) c.bnez  a0, pc + 0
core   0: 0x000000008000004a (0x00000297) auipc   t0, 0x0
core   0: 0x000000008000004e (0x01228293) addi    t0, t0, 18
core   0: 0x0000000080000052 (0x30529073) csrw    mtvec, t0
core   0: 0x0000000080000056 (0x18005073) csrwi   satp, 0
core   0: 0x000000008000005a (0x00000001) c.nop
core   0: 0x000000008000005c (0x00000297) auipc   t0, 0x0
core   0: 0x0000000080000060 (0x01828293) addi    t0, t0, 24
core   0: 0x0000000080000064 (0x30529073) csrw    mtvec, t0
core   0: 0x0000000080000068 (0x000052fd) c.li    t0, -1
core   0: 0x000000008000006a (0x3b029073) csrw    pmpaddr0, t0
core   0: 0x000000008000006e (0x000042fd) c.li    t0, 31
core   0: 0x0000000080000070 (0x3a029073) csrw    pmpcfg0, t0

(Формат трасс обычно настраивается, так что он может сильно отличаться от примера.)

No data to display

Actions

Also available in: Atom PDF