In-depth understanding of the Java Virtual Machine: JVM advanced features and best practices full version [217MB] download

In-depth understanding of the Java Virtual Machine: JVM advanced features and best practices (Second Edition) Introduction:

Super best-selling book new upgrade, the first edition has been printed nearly 10 times in two years, the classic book recognized in the field of Java books, the traditional version of Taiwan released
   based on the latest JDK1.7, around memory management, execution subsystem, program compilation and optimization, efficient concurrency The core theme provides a comprehensive and in-depth analysis of the JVM, and deeply reveals the working principle of the JVM.
   Practice-oriented, through a large number of cases combined with the actual production environment, shows the skills and best practices for solving various common JVM problems

Translator
Zhou Zhiming, a senior java technical expert, has in-depth research on javaee enterprise application development, osgi, java virtual machine and workflow, and has accumulated rich experience in a large number of practices. Especially proficient in java virtual machine, wrote a large number of classic articles related to jvm, and was reprinted by major technical communities. It is one of the leaders of java virtual machine recognized by the technical community such as iteye. In addition to this book, there is also the classic book "In-depth understanding of osgi: principle, application and best practices of equinox", which has been well received by readers. He is currently the general manager and architect of the development department of Yuanguang Software Co., Ltd., and has participated in the platform architecture work of many national-level large-scale erp projects such as State Grid and China Southern Power Grid.

In-depth understanding of the Java Virtual Machine: JVM advanced features and best practices (2nd edition)

The first part is approaching java
. The first chapter is approaching java / 2
1.1 Overview / 2
1.2 Java technology system / 3
1.3 History of java development / 5
1.4 History of java virtual machine development / 9
1.4.1 sun classic / exact vm / 9
1.4.2 sun hotspot vm / 11
1.4.3 sun mobile-embedded vm / meta-circular vm / 12
1.4.4 bea jrockit / ibm j9 vm / 13
1.4.5 azul vm / bea liquid vm / 14
1.4.6 apache harmony / google android dalvik vm / 14
1.4.7 microsoft jvm and others / 15
1.5 Looking forward to the future of java technology / 16
1.5.1 Modularization / 17
1.5.2 Mixed languages ​​/ 17
1.5.3 Multi-core parallelism / 19
1.5.4 Further enriching the syntax / 20
.1.5.5 64-bit virtual machine / 21
1.6 Actual combat: compile jdk by yourself / 22
1.6.1 Obtain jdk source code / 22
1.6.2 System requirements / 24
1.6.3 Build and compile environment / 25
1.6.4 compile / 26
1.6.5, source-debugging tool ide / 31
1.7 Summary / 35
The second part of the automatic memory management in
Chapter 2 java area of memory and memory overflow exception / 38
2.1 Overview / 38
2.2 run Data area / 38
2.2.1 Program counter / 39
2.2.2 Java virtual machine stack / 39
2.2.3 Local method stack / 40
2.2.4 Java heap / 41
2.2.5 Method area / 41
2.2.6 Run-time constant pool / 42
2.2.7 Direct memory / 43
2.3 Hotspot virtual machine object exploration / 43
2.3.1 Object creation / 44
2.3.2 Object memory layout / 47
2.3.3 Object access positioning / 48
2.4 Actual combat: outofmemoryerror exception / 50
2.4 .1 java stack overflow / 51
2.4.2 VM stack overflow and a native method stacks / 53
2.4.3 method runtime constant pool area and overflow / 56
2.4.4 local direct memory overflow / 59
2.5 Summary / 60
3 Chapter Garbage Collector and Memory Allocation Strategy / 61
3.1 Overview / 61
3.2 Is the object dead / 62
3.2.1 Reference counting algorithm / 62
3.2.2 Reachability analysis algorithm / 64
3.2.3 Talking about references / 65
3.2.4 Survival or death / 66
3.2.5 Recycling method area / 68
3.3 Garbage collection algorithm / 69
3.3.1 Mark-and-sweep algorithm / 69
3.3.2 Copy algorithm / 70
3.3.3 Mark-and-sort algorithm / 71
3.3.4 Generational collection algorithm / 72
3.4 Hotspot algorithm implementation / 72
3.4.1 Root node / 72
3.4.2 Security point / 73
3.4.3 Security zone / 74
3.5 Garbage collector / 75
3.5.1 serial collector / 76
3.5.2 parnew collector / 77
3.5.3 parallel scavenge collector / 79
3.5.4 serial old collector / 80
3.5.5 parallel old collector / 80
3.5.6 cms collector / 81
3.5.7 g1 collector / 84
3.5.8 understand gc log / 89
3.5.9 garbage collector parameter summary / 90
3.6 Memory allocation and recycling strategy / 91
3.6.1 Objects are allocated preferentially in eden / 91
3.6.2 Large objects enter the old generation directly / 93
3.6.3 Long-lived objects will enter the old generation / 95
3.6.4 Dynamic object age determination / 97
3.6.5 Space allocation guarantee / 98
3.7 Summary of this chapter / 100
Chapter 4 Virtual machine performance monitoring and troubleshooting tools / 101
4.1 Overview / 101
4.2 Jdk command line tool / 101
4.2.1 jps: virtual machine process status tool / 104
4.2.2 jstat: virtual machine Statistical information monitoring tool / 105
4.2.3 jinfo: java configuration information tool / 106
4.2.4 jmap: java memory imaging tool / 107
4.2.5 jhat: virtual machine heap dump snapshot analysis tool / 108
4.2.6 jstack: java stack Tracking tools / 109
4.2.7 hsdis: jit generated code disassembly / 111
4.3 jdk visualization tools / 114
4.3.1 jconsole: java monitoring and management console / 115
4.3.2 visualvm: all-in-one troubleshooting tool / 122
4.4 Chapter Summary / 131
Chapter 5 Tuning Case Analysis and Actual Combat / 132
5.1 Overview / 132
5.2 Case Analysis / 132
5.2.1 Program deployment strategy on high-performance hardware / 132
5.2.2 Memory overflow caused by synchronization between clusters / 135
5.2.3 Overflow error caused by off-heap memory / 136
5.2.4 System slow due to external commands / 137
5.2.5 Server jvm process crash / 138
5.2.6 Inappropriate data structure leads to excessive memory usage / 139
5.2.7 Long pause caused by windows virtual memory / 141
5.3 Actual combat: eclipse running speed tuning / 142
5.3.1 Before tuning Program running status / 142
5.3.2 Upgrade jdk 1.6 performance changes and compatibility issues / 145
5.3.3 Compile time and class load time optimization / 150
5.3.4 Adjust memory settings to control the frequency of garbage collection / 153
5.3.5 Select collection is to reduce the delay / 157
5.4 Summary / 160
third portion of the virtual machine executing sub
Chapter 6 of the class file structure / 162
6.1 Overview / 162
6.2 independent of the foundation / 162
configuration 6.3 class class files / 164
6.3.1 Sum Version with class file / 166
6.3.2 Constant pool / 167
6.3.3 Access flag / 173
6.3.4 Class index, parent class index and interface index collection / 174
6.3.5 Field table collection / 175
6.3.6 Method table collection / 178
6.3.7 Attribute table collection / 180
6.4 Introduction to bytecode instructions / 196
6.4.1 Bytecode and data types / 197
6.4.2 Load and store instructions / 199
6.4.3 Operation instructions / 200
6.4.4 Type conversion instructions / 202
6.4.5 Object creation and access instructions / 203
6.4.6 Operand stack management instructions / 203
6.4.7 Control transfer instructions / 204
6.4.8 Method call And return instructions / 204
6.4.9 Exception handling instructions / 205
6.4.10 Synchronization instructions / 205
6.5 Public design and private implementation / 206
6.6 Development of class file structure / 207
6.7 Summary of this chapter / 208
Chapter 7 Virtual machine class loading mechanism / 209
7.1 Overview / 209
7.2 Timing of class loading / 210
7.3 Process of class loading / 214
7.3.1 Loading / 214
7.3.2 Verification / 216
7.3.3 Preparation / 219
7.3.4 Resolution / 220
7.3.5 Initialization / 225
7.4 Class loader / 227
7.4.1 Class and class loader / 228
7.4.2 Parent delegation model / 229
7.4.3 Destruction of parent delegation model / 233
7.5 Summary of this chapter / 235
Chapter 8 Virtual machine bytecode execution engine / 236
8.1 Overview / 236
8.2 Runtime stack frame structure / 236
8.2.1 Local variable table / 238
8.2.2 Operand stack / 242
8.2.3 Dynamic link / 243
8.2.4 Method return address / 243
8.2.5 Additional information / 244
8.3 Method invocation / 244
8.3.1 Parsing / 244
8.3.2 Dispatch / 246
8.3.3 Dynamically typed language support / 258
8.4 Stack-based bytecode interpretation execution engine / 269
8.4.1 Interpretation execution / 269
8.4.2 Stack-based Instruction set and register-based instruction set / 270
8.4.3 Stack-based interpreter execution process / 272
8.5 Summary of this chapter / 275
Chapter 9 Class loading and execution subsystem cases and actual combat / 276
9.1 Overview / 276
9.2 Case analysis / 276
9.2.1 tomcat: Orthodox class loader architecture / 276
9.2.2 osgi: flexible class loader architecture / 279
9.2.3 bytecode generation technology and dynamic proxy implementation / 282
9.2.4 retrotranslator: cross jdk version / 286
9.3 actual combat: do it yourself to implement remote execution function / 289
9.3 .1 target / 290
9.3.2 thinking / 290
9.3.3 Implementation / 291
9.3.4 verification / 298
9.4 Summary / 299
the fourth program is compiled with the code optimization
Chapter 10 early (compile) optimization / 302
10.1 Summary / 302
10.2 javac compiler / 303
10.2.1 javac source code and debugging / 303
10.2.2 parsing and filling symbol table / 305
10.2.3 annotation processor / 307
10.2.4 semantic analysis and bytecode generation / 307
10.3 java syntax The taste of sugar / 311
10.3.1 Generics and type erasure / 311
10.3.2 Automatic boxing, unboxing and traversal cycle / 315
10.3.3 Conditional compilation / 317
10.4 Actual combat: plug-in annotation processor / 318
10.4.1 Actual combat goals / 318
10.4.2 Code realization / 319
10.4.3 Operation and testing / 326
10.4.4 Other application cases / 327
10.5 Summary of this chapter / 328
Chapter 11 Late (runtime) optimization / 329
11.1 Overview / 329
11.2 Just-in-time compiler in hotspot virtual machine / 329
11.2.1 Interpreter and Compiler / 330
11.2.2 Compilation Objects and Trigger Conditions / 332
11.2.3 Compilation Process / 337
11.2.4 View and Analyze Instant Compilation Results / 339
11.3 Compilation Optimization Technology / 345
11.3.1 Optimization Technology Overview / 346
11.3 .2 Common
Subexpression Elimination / 350 11.3.3 Array Boundary Check Elimination / 351
11.3.4 Method Inlining / 352
11.3.5 Escape Analysis / 354
11.4 Compiler Comparison of Java and C / C ++ / 356
11.5 Summary of this chapter / 358
the fifth and efficient concurrent
Chapter 12 java memory model and thread / 360
12.1 Overview / 360
12.2 hardware efficiency and consistency / 361
12.3 the Java memory model / 362
12.3.1 main memory and working memory / 363
12.3.2 interaction between memory Operation / 364
12.3.3 Special rules for volatile type variables / 366
12.3.4 Special rules for long and double type variables / 372
12.3.5 Atomicity, visibility and
orderness / 373 12.3.6 Principle of prior occurrence / 375
12.4 java With threads / 378
12.4.1 Implementation of threads / 378
12.4.2 Java thread scheduling / 381
12.4.3 State transitions / 383
12.5 Summary of this chapter / 384
Chapter 13 Thread safety and lock optimization / 385
13.1 Overview / 385
13.2 Thread safety / 385
13.2.1 Thread safety in Java language / 386
13.2.2 Thread safety implementation method / 390
13.3 Lock optimization / 397
13.3.1 Spin lock and adaptive spin / 398
13.3.2 Lock elimination / 398
13.3.3 lock coarsening / 400
13.3.4 lightweight lock / 400
13.3.5 biased locking / 402
13.4 Summary / 403
Appendices
Appendix a compiled version of windows openjdk / 406
appendix b virtual machine bytecode instruction list / 414
appendix c hotspot Virtual machine main parameter table / 420
Appendix d Object Query Language (oql) Introduction / 424
appendix e jdk version history tracks / 430

 

 

 

download link

https://pan.baidu.com/s/1QQvZNc6ARJRKhEbsbThF8Q

  • To extract the code:

    [Open WeChat]-> [Scan the QR code below]-> [Follow Data and People] Enter "200416" to get the extraction code 

    Adhere to the sharing of e-book resources, thank you for your approval!

    If you cancel following this public account, even if you follow again, you will not be able to provide this service.

Guess you like

Origin www.cnblogs.com/sunkang-dba/p/12745715.html
Recommended