debugging - How can I get the bytecodes that are executed at runtime for a Java program? -


the compiled .class file contains bytecodes corresponding whole java class. however, during execution, bytecodes exectued multiple times while not executed @ all, depending on logic , input. there way trace of bytecodes executed during lifetime of java program?

edit: use case

i think use-case may help. after sample run of program, count frequency of bytecode instructions executed (e.g. areturn has been carried out 10 times). there profiler or other tool can use purpose?

this obscure paper talks such tool

http://ccsl.icmc.usp.br/files/vincenzi-et-al-2003.pdf

it's quite old (2003)

it states

this paper describes coverage testing tool java programs , java-based components, named jabuti (java bytecode understanding , testing). differently other testing tools require java source code carry out program analysis, instrumentation , coverage assessment, our tool requires java bytecode. bytecode can viewed assembly-like language retains high-level information program [lindholm , yellin, 1999 ]. therefore, jabuti enables user test java programs , java-based components when no source code available. there others testing tools work @ bytecode level. frame work junit [beck , gamma, 2002 ], instance, can used test java bytecode, enables performing black-box testing; not report coverage information. jtest [corporation, 2002] , glassjar [edge, 2002 ] provide coverage information respect control-flow testing criteria @ bytecode level, none of them supports dataflow coverage testing criteria. working @ bytecode level want provide tool can used testing not java applications have corresponding source code available, also, ones have bytecode, software components


Comments

Popular posts from this blog

python - Subclassed QStyledItemDelegate ignores Stylesheet -

java - HttpClient 3.1 Connection pooling vs HttpClient 4.3.2 -

SQL: Divide the sum of values in one table with the count of rows in another -