专注虚拟机与编译器研究

研究小技巧及专业术语

 

1、在Linux命令行中以图形化窗口打开文件夹  nautilus /home/testProjects/

2、截图使用 PrintScreen,如果是部分截图,则为Shift+PrintScreen

3、alt+ctrl+t 快速打开ubuntu的终端

4、Mac下的截图操作分别为COMMAND+SHIFT+3,COMMAND+SHIFT+4。ubuntu下部分截图使用Shift+PrtSc

5、苹果机为 ⌘ 和 + 或 ⌘ 和 - 用来缩放浏览器网页大小

6、

(1)命令模式下输入“/字符串”。

(2)如果查找下一个,按“n”即可。

要自当前光标位置向上搜索,请使用以下命令:

/pattern Enter

其中,pattern表示要搜索的特定字符序列。

要自当前光标位置向下搜索,请使用以下命令:

?pattern Enter

7、gg回到文件开头处理,G将光标定位到文件末尾

8、下载hsdis http://lafo.ssw.uni-linz.ac.at/hsdis/att/ 

9、通过终端打开图形界面,Mac下为open .,而ubuntu下为nautilus

10、sudo dpkg -i 软件包名.deb

11、修改hosts文件的方法如下:

ubuntu下配置host的方法:打开终端输入命令:sudo vim /etc/hosts,在vim中进入插入模式(需要点击insert按键),插入要配置的host地址,按ESC键,调至命令模式,按住 shift+; 键,输入wq,再按回车键,便配置成功了host地址;

修改 hosts 后,使 hosts 文件修改生效:

sudo /etc/init.d/dns-clean start
sudo /etc/init.d/networking restart

12、ubuntu下github速度慢的解决办法:在hosts中将域名配置为IP

 

 

术语:

1、bytecode index(bci)

2、字节码指针bcp = code_base+bci

3、在64位机器上,如果int是32位,long是64位,pointer也是64位,那么该机器就是LP64的,其中的L表示Long,P表示Pointer,64表示Long和Pointer都是64位的。由于LP64位下int是32位,因此LP64也叫I32LP64。

4、System V ABI,即System V Application Binary Interface,包含了一系列关于调用规范(Calling Convention)、对象文件格式、可执行文件格式等很多方面的规范细节。如果我们采用GNU Compiler Collection(GCC) 来开发我们的操作系统,那么我们最好遵循这些规范。
5、ELF,Executable and Linkable Format,是Unix以及类Unix系统对象文件的格式标准。ELF是一种可扩展的文件格式,不同的硬件平台和操作系统下均有不同的实现。
6、POSIX 表示可移植操作系统接口(Portable Operating System Interface ,缩写为 POSIX ),POSIX标准定义了操作系统应该为应用程序提供的接口标准,是IEEE为要在各种UNIX操作系统上运行的软件而定义的一系列API标准的总称,其正式称呼为IEEE 1003,而国际标准名称为ISO/IEC 9945。
7、TLS Thread Local Storage
8、全序与偏序
偏序只对部分元素成立关系R,全序对集合中任意两个元素都有关系R。
例如:
集合的包含关系就是半序,也就是偏序,因为两个集合可以互不包含;
而实数中的大小关系是全序,两个实数必有一个大于等于另一个;
 

 

偏序集合(英语:Partially ordered set,简写 poset)设R是非空集合A上的一个二元关系,若R满足: 自反性、反对称性(注意,不是非对称性)、传递性,则称R为A上的偏序关系。

thereby 因此;由此;从而  我们的身体能出汗,由此可以蒸发散热。[例句]Our bodies can sweat, thereby losing heat by evaporation 

purge 清除,清洗(组织中的异己分子); 净化(心灵、风气等); 涤荡(污秽); n. (对异己的) 清洗,清除,排除; 

mutual exclusion 互斥 
with respect to 关于、至于
extraneous没有直接联系的; 无关的;
tenure (尤指重要政治职务的)任期,任职;(尤指大学教师的)终身职位,长期聘用;(房地产的)保有权,保有期
多处理器系统(Symmetric Multi-Processor,简称 SMP)
fine-grained 细粒的;有细密纹理的;

mandate 授权; (政府的) 任期; 委托书; 授权令;

coarse-grained 粗(晶)粒的;大粒度的;(木材)粗纹的;

 speculative 推测的

mirror image 镜像 

scalar 标量,标量是指一个数据已经无法再分解成更小的数据来表示了

Compilation Bailout,即编译脱离,这个词在JIT编译器中经常出现,它指的是当编译器在编译过程中遇到一些很难处理的情况,或者一些极特殊情况时会停止编译,然后回退到解释器

“aka是Also Known As的缩写,当某人或某事有广为人知的别名时,可以用AKA来介绍。 

duck typing 鸭子类型 

SIMD Single Instruction Multiple Data 

 

HotSpot Glossary(术语汇编,词汇表) of Terms

A work in progress, especially as the HotSpot VM evolves. But a place to put definitions of things so we only have to define them once. There are empty entries (marked TBD for "to be defined") because we think of things that we need to define faster than we think of good definitions.

adaptive spinning
An optimization technique whereby a thread spins waiting for a change-of-state to occur (typically a flag that represents some event has occurred - such as the release of a lock) rather than just blocking until notified that the change has occurred. The "adaptive" part comes from the policy decisions that control how long the thread will spin until eventually deciding to block.
biased locking
An optimization in the VM that leaves an object as logically locked by a given thread even after the thread has released the lock. The premise is that if the thread subsequently reacquires the lock (as often happens), then reacquisition can be achieved at very low cost. If a different thread tries to acquire a biased lock then the bias must be revoked from the current bias owner.
block start table
A table that shows, for a region of the heap, where the object starts that comes on to this region from lower addresees. Used, for example, with the card table variant of the remembered set.
bootstrap classloader
The logical classloader that has responsibility for loading the classes (and resources) that are found in the boot-classpath - typically the core Java platform classes. Typically implemented as part of the VM, by historical convention the bootstrap classloader is represented by NULL at the Java API level.
bytecode verification
A step in the linking process of a class where the methods bytecodes are analyzed to ensure type-safety.
C1 compiler
Fast, lightly optimizing bytecode compiler. Performs some value numbering, inlining, and class analysis. Uses a simple CFG-oriented SSA "high" IR, a machine-oriented "low" IR, a linear scan register allocation, and a template-style code generator.
C2 compiler
Highly optimizing bytecode compiler, also known as 'opto'. Uses a "sea of nodes" SSA "ideal" IR, which lowers to a machine-specific IR of the same kind. Has a graph-coloring register allocator; colors all machine state, including local, global, and argument registers and stack. Optimizations include global value numbering, conditional constant type propagation, constant folding, global code motion, algebraic identities, method inlining (aggressive, optimistic, and/or multi-morphic), intrinsic replacement, loop transformations (unswitching, unrolling), array range check elimination.
card table
A kind of remembered set that records where oops have changed in a generation.
class data sharing
A startup optimization that records the in-memory form of some classes, so that that form can be mapped into memory by a subsequent run of the virtual machine, rather than loading those classes from their class files.
class hierachy analysis
Also known as 'CHA'. Analysis of the class tree used by a compiler to determine if the receiver at a virtual call site has a single implementor. If so, the callee can be inlined or the compiler can employ some other static call mechanism.
code cache
A special heap that holds compiled code. These objects are not relocated by the GC, but may contain oops, which serve as GC roots.
compaction
A garbage collection technique that results in live objects occupying a dense portion of the virtual address space, and available space in another portion of the address space. Cf. free list.
concurrency
Concurrency, or more specifically concurrent programming, is the logical simultaneous execution of multiple instruction streams. If multiple processors are available then the logical simultaneity can be physical simultaneity - this is known as 'parallelism'
concurrent garbage collection
A garbage collection algorithm that does most (if not all) of its work while the Java application threads are still running.
copying garbage collection
A garbage collection algorithm that moves objects during the collection.
deoptimization
The process of converting an compiled (or more optimized) stack frame into an interpreted (or less optimized) stack frame. Also describes the discarding of an nmethod whose dependencies (or other assumptions) have been broken. Deoptimized nmethods are typically recompiled to adapt to changing application behavior. Example: A compiler initially assumes a reference value is never null, and tests for it using a trapping memory access. Later on, the application uses null values, and the method is deoptimized and recompiled to use an explicit test-and-branch idiom to detect such nulls.
dependency
An optimistic assumption associated with an nmethod, which allowed the compiler to emit improved code into the nmethod. Example: A given class has no subclasses, which simplifies method dispatch and type testing. The loading of new classes (or replacement of old classes) can cause dependencies to become false, which requires dependent nmethods to be discarded and activations of those nmethods to be deoptimized.
eden
A part of the Java object heap where object can be created efficiently.
free list
A storage management technique in which unused parts of the Java object heap are chained one to the next, rather than having all of the unused part of the heap in a single block.
garbage collection
The automatic management of storage.
garbage collection root
A pointer into the Java object heap from outside the heap. These come up, e.g., from static fields of classes, local references in activation frames, etc.
GC map
A description emitted by the JIT (C1 or C2) of the locations of oops in registers or on stack in a compiled stack frame. Each code location which might execute a safepoint has an associated GC map. The GC knows how to parse a frame from a stack, to request a GC map from a frame's nmethod, and to unpack the GC map and manage the indicated oops within the stack frame.
generational garbage collection
A storage management technique that separates objects expected to be referenced for different lengths of time into different regions of the heap, so that different algorithms can be applied to the collection of those regions.
handle
A memory word containing an oop. The word is known to the GC, as a root reference. C/C++ code generally refers to oops indirectly via handles, to enable the GC to find and manage its root set more easily. Whenever C/C++ code blocks in a safepoint, the GC may change any oop stored in a handle. Handles are either 'local' (thread-specific, subject to a stack discipline though not necessarily on the thread stack) or global (long-lived and explicitly deallocated). There are a number of handle implementations throughout the VM, and the GC knows about them all.
hot lock
A lock that is highly contended.
interpreter
A VM module which implements method calls by individually executing bytecodes. The interpreter has a limited set of highly stylized stack frame layouts and register usage patterns, which it uses for all method activations. The Hotspot VM generates its own interpreter at start-up time.
JIT compilers
An on-line compiler which generates code for an application (or class library) during execution of the application itself. ("JIT" stands for "just in time".) A JIT compiler may create machine code shortly before the first invocation of a Java method. Hotspot compilers usually allow the interpreter ample time to "warm up" Java methods, by executing them thousands of times. This warm-up period allows a compiler to make better optimization decisions, because it can observe (after initial class loading) a more complete class hierarchy. The compiler can also inspect branch and type profile information gathered by the interpreter.
JNI
The Java Native Interface - a specification and API for how Java code can call out to native C code, and how native C code can call into the Java VM
JVM TI
The Java Virtual Machine Tools Interface - a standard specification and API that is used by development and monitoring tools. See JVM TI for more information.
klass pointer
The second word of every object header. Points to another object (a metaobject) which describes the layout and behavior of the original object. For Java objects, the "klass" contains a C++ style "vtable".
mark word
The first word of every object header. Usually a set of bitfields including synchronization state and identity hash code. May also be a pointer (with characteristic low bit encoding) to synchronization related information. During GC, may contain GC state bits.
nmethod
A block of executable code which implements some Java bytecodes. It may be a complete Java method, or an 'OSR' method. It routinely includes object code for additional methods inlined by the compiler.
object header
Common structure at the beginning of every GC-managed heap object. (Every oop points to an object header.) Includes fundamental information about the heap object's layout, type, GC state, synchronization state, and identity hash code. Consists of two words. In arrays it is immediately followed by a length field. Note that both Java objects and VM-internal objects have a common object header format.
object promotion
The act of copying an object from one generation to another.
old generation
A region of the Java object heap that holds object that have remained referenced for a while.
on-stack replacement
Also known as 'OSR'. The process of converting an interpreted (or less optimized) stack frame into a compiled (or more optimized) stack frame. This happens when the interpreter discovers that a method is looping, requests the compiler to generate a special nmethod with an entry point somewhere in the loop (specifically, at a backward branch), and transfers control to that nmethod. A rough inverse to deoptimization.
oop
An object pointer. Specifically, a pointer into the GC-managed heap. (The term is traditional. One 'o' may stand for 'ordinary'.) Implemented as a native machine address, not a handle. Oops may be directly manipulated by compiled or interpreted Java code, because the GC knows about the liveness and location of oops within such code. (See GC map.) Oops can also be directly manipulated by short spans of C/C++ code, but must be kept by such code within handles across every safepoint.
parallel classloading
The ability to have multiple classes/type be in the process of being loaded by the same classloader at the same time.
parallel garbage collection
A garbage collection algorithm that uses multiple threads of control to perform more efficiently on multi-processor boxes.
permanent generation
A region of the address space that holds object allocated by the virtual machine itself, but which is managed by the garbage collector. The permanent generation is mis-named, in that almost all of the objects in it canbe collected, though they tend to be referenced for a long time, so they rarely become garbage.
remembered set
A data structure that records pointers between generations.
safepoint
A point during program execution at which all GC roots are known and all heap object contents are consistent. From a global point of view, all threads must block at a safepoint before the GC can run. (As a special case, threads running JNI code can continue to run, because they use only handles. During a safepoint they must block instead of loading the contents of the handle.) From a local point of view, a safepoint is a distinguished point in a block of code where the executing thread may block for the GC. Most call sites qualify as safepoints. There are strong invariants which hold true at every safepoint, which may be disregarded at non-safepoints. Both compiled Java code and C/C++ code be optimized between safepoints, but less so across safepoints. The JIT compiler emits a GC map at each safepoint. C/C++ code in the VM uses stylized macro-based conventions (e.g., TRAPS) to mark potential safepoints.
sea-of-nodes
The high-level intermediate representation in C2. It is an SSA form where both data and control flow are represented with explicit edges between nodes. It differs from forms used in more traditional compilers in that nodes are not bound to a block in a control flow graph. The IR allows nodes to float within the sea (subject to edge constraints) until they are scheduled late in the compilation process.
Serviceability Agent (SA)
The Serviceablity Agent is collection of Sun internal code that aids in debugging HotSpot problems. It is also used by several JDK tools - jstack, jmap, jinfo, and jdb. See SA for more information.
stackmap
Refers to the StackMapTable attribut e or a particular StackMapFrame in the table.
StackMapTable
An attribute of the Code attribute in a classfile which contains type information used by the new verifier during verification. It consists of an array of StackMapFrames. It is generated automatically by javac as of JDK6.
survivor space
A region of the Java object heap used to hold objects. There are usually a pair of survivor spaces, and collection of one is achieved by copying the referenced objects in one survivor space to the other survivor space.
synchronization
In general terms this is the coordination of concurrent activities to ensure the safety and liveness properties of those activities. For example, protecting access to shared data by using a lock to guard all code paths to that data.
TLAB
Thread-local allocation buffer. Used to allocate heap space quickly without synchronization. Compiled code has a "fast path" of a few instructions which tries to bump a high-water mark in the current thread's TLAB, successfully allocating an object if the bumped mark falls before a TLAB-specific limit address.
uncommon trap
When code generated by C2 reverts back to the interpreter for further execution. C2 typically compiles for the common case, allowing it to focus on optimization of frequently executed paths. For example, C2 inserts an uncommon trap in generated code when a class that is uninitialized at compile time requires run time initialization.
verifier
The software code in the VM which performs bytecode verification.
VM Operations
Operations in the VM that can be requested by Java threads, but which must be executed, in serial fashion by a specific thread known as the VM thread. These operations are often synchronous, in that the requester will block until the VM thread has completed the operation. Many of these operations also require that the VM be brought to a safepoint before the operation can be performed - a garbage collection request is a simple example.
write barrier
Code that is executed on every oop store. For example, to maintain a remembered set.
young generation
A region of the Java object heap that holds recently-allocated objects.
参考:
 
 
 
 
 

 

posted on 2019-06-03 15:13  鸠摩(马智)  阅读(650)  评论(0编辑  收藏  举报

导航