javap的一些使用例子

Created by Wang, Jerry on Oct 23, 2016

javap的一些使用例子
javap的一些使用例子
stack=4, locals=1, args_size=1
Values in bytecode are stored in local variable slots and on the operand stack. Each can have up to 2^16 - 1 slots, but for efficiency reasons, you are required to specify a limit on the stack and locals so that it won’t waste all that space if you aren’t actually using it.
In compiled code, the compiler will automatically calculate this as the minimum that’s actually used in the function. In this case, it is using 4 slots in the operand stack and 1 slot in the local variable table. I am not sure what arg_size is, but I am guessing this is just the total size of parameters (i.e. the number of arguments). At any rate, this doesn’t correspond to any feature of the classfile format, so whatever it is, javap is calculating and inserting it manually.
LineNumberTable: section
The LineNumberTable is one of the optional attributes that holds metadata for debugging purposes. In this case, it specifies which offsets in the bytecode correspond to each line in the original source code. This is useful for printing more informative stack traces and for providing features like single step in the debugger.
Useful list:
https://en.wikipedia.org/wiki/Java_bytecode_instruction_listings
#1: NullableTest
#43 = #14.#15
javap的一些使用例子
http://docs.oracle.com/javase/specs/jvms/se8/html/jvms-4.html#jvms-4.4.2
javap的一些使用例子
javap的一些使用例子

上一篇:基于centos 7的Redis群集原理及配置


下一篇:Redis Cluster高可用集群在线迁移操作记录