{{sellerTotalView > 1 ? __("sellers", {number: sellerTotalView}) : __("seller", {number: sellerTotalView}) }}, {{numTotalView > 1 ? __("items", {number: numTotalView}) : __("item", {number: numTotalView}) }}
free FREE

Change Your Zip Code

Inventory information and delivery speeds may vary for different locations.

Location History

{{email ? __('Got it!') : __('Restock Alert')}}

We will notify you by email when the item back in stock.

Cancel
Yami

Jingdong book

HotSpot实战

{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}

HotSpot实战

{{__(":people-members", {'people': item.limit_people_count})}} {{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ item.invalid_price }} {{ itemDiscount }}
Ends in
{{ itemCurrency }}{{ item.valid_price }}
{{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }}
{{ itemDiscount }}
{{ itemCurrency }}{{ item.valid_price }} {{ itemCurrency }}{{ priceFormat(item.valid_price / item.bundle_specification) }}/{{ item.unit }} {{ itemCurrency }}{{ item.invalid_price }} {{itemDiscount}}
{{ itemCurrency }}{{ item.valid_price }}
Sale ends in
Sale will starts after Sale ends in
{{ getSeckillDesc(item.seckill_data) }}
{{ __( "Pay with Gift Card to get sale price: :itemCurrency:price", { 'itemCurrency' : itemCurrency, 'price' : (item.giftcard_price ? priceFormat(item.giftcard_price) : '0.00') } ) }} ({{ itemCurrency }}{{ priceFormat(item.giftcard_price / item.bundle_specification) }}/{{ item.unit }}) Details
Best before

Currently unavailable.

We don't know when or if this item will be back in stock.

Unavailable in your area.
Sold Out

Details

Full product details
Editer Recommend

“蚓无爪牙之利,筋骨之强,上食埃土,下饮黄泉,用心一也。蟹六跪而二螯,非蛇蟮之穴无可寄托者,用心躁也”。对于技术人员来说,如果长期忽略自身技术的根基而去一昧地追求高层框架技术,这无疑是舍本求末的做法。
相较于C或C++程序员,我发现Java程序员更容易忽视基础技术。JVM的出现,为程序员屏蔽了操作系统与硬件的细节,使得程序员从诸如内存管理这样的繁琐任务中解放出来。但这不并等同于允许Java程序员放弃对基础的重视。我们是否有过这样的经历,在遇到内存故障、丢包、网络协议设计、资源瓶颈、证书、二进制等问题时,往往会觉得比较棘手,在寻求解决思路时更是显得力不从心。这实质上是自身技术遇到了瓶颈难以突破所致。可怕的是,想去深究的时候却无从下手。
我写这本书的初衷是为了唤起Java程序员对于基础技术的重视。事实上,任何平台的程序员都应当了解平台的基本特性、实现机制以及接口,这是提高自身修养的必经之路。对于Java程序员来说,我们需要了解的平台就是JVM。了解JVM的基本实现机制,不仅对于解决实际应用中诸如GC等虚拟机问题时有直接帮助,还有利于我们更好地理解语言本身。
所幸的是,Oracle官方已经将虚拟机项目的源码开放出来,这对于我们来说简直就是福音。本书将以OpenJDK和HotSpot为素材,深入浅出地讲解我们最为熟悉的一款虚拟机产品的实现。除了Java程序员,从事与Java或JVM相关的开发、测试、运维等技术人员也将在《HotSpot实战》中获益。

Content Description

《HotSpot实战》深入浅出地讲解了HotSpot虚拟机的工作原理,将隐藏在它内部的本质内容逐一呈现在读者面前,包括OpenJDK与HotSpot项目、编译和调试HotSpot的方法、HotSpot内核结构、Launcher、OOP-Klass对象表示系统、链接、运行时数据区、方法区、常量池和常量池Cache、Perf Data、Crash分析方法、转储分析方法、垃圾收集器的设计演进、CMS和G1收集器、栈、JVM对硬件寄存器的利用、栈顶缓存技术、解释器、字节码表、转发表、Stubs、Code Cache、Code生成器、JIT编译器、C1编译器、编译原理、JVM指令集实现、函数的分发机制、VTABLE和ITABLE、异常表、虚拟机监控工具(如jinfo、jstack、jhat、jmap等)的实现原理和开发方法、Attach机制、基于GUI的JVM分析工具(如MAT、VisualVM)等内容。
除了HotSpot技术,《HotSpot实战》还对方法论进行了探讨。在各个章节的讲解中,都会有一些与系统运行机制相关的实战或练习,供读者练手。通过这些实战练习,不仅有助于读者加深对知识或原理的理解,更为重要的是,它还可以培养读者独立探索的思维方式,这有助于读者把知识融会贯通并灵活应用到实际项目中。
《HotSpot实战》适合于已具有一定Java编程基础的读者,以及在Java或基于JVM的编程语言平台下进行各类软件开发的开发人员、测试人员和运维人员。对于JVM和编程语言爱好者来说,《HotSpot实战》也具有一定的学习参考价值。
Author Description

陈涛,硕士,毕业于中国科技大学。现就职于网易公司旗下的网易宝,从事在线支付系统的设计与开发工作。在从事Java工作之前 ,曾有过Linux内核及驱动开发工作经验。热衷于专研技术,对编程语言和JVM比较感兴趣。工作之余 ,喜欢足球和武侠带来的乐趣。目前正在“专研”的课题是如何做一名称职的奶爸。

Comments

陈涛是网易宝的核心开发人员之一,同时维护了网易宝的多个系统。网易宝是网易官方的在线支付系统,对开发工程师的技术要求极高。他喜欢专研技术,知识面宽,不仅对Java、C、C++熟悉,对操作系统底层也很熟悉,能够将理论很好地应用于实践中。本书便是他潜心研究和实践的成果。
——赵刚,网易宝系统负责人,资深技术专家


陈涛在Java开发领域知识的深度和广度给我留下了深刻的印象。本书深入浅出地介绍了JVM技术,强调实践应用。对于想深入研究JVM并希望快速取得进展的开发人员来说,本书非常具有实用价值,是Java开发水平更上一层楼的阶石。
——陈双辉,现任通策集团信息事业部CTO,曾在摩托罗拉移动担任Senior PM。

Catalogue

第1章初识HotSpot1
1.1JDK概述2
1.1.1JCP与JSR3
1.1.2JDK的发展历程4
1.1.3Java 7的语法变化7
1.2动手编译虚拟机13
1.2.1源代码下载13
1.2.2HotSpot源代码结构13
1.2.3搭建编译环境15
1.2.4编译目标16
1.2.5编译过程17
1.2.6编译常见问题19
1.3实战:在HotSpot内调试HelloWorld20
1.3.1认识GDB21
1.3.2准备调试脚本22
1.4小结26

第2章启动28
2.1HotSpot内核28
2.1.1如何阅读源代码28
2.1.2HotSpot内核框架36
2.1.3Prims37
2.1.4Services39
2.1.5Runtime43
2.2启动46
2.2.1Launcher46
2.2.2虚拟机生命周期48
2.2.3入口:main函数50
2.2.4主线程51
2.2.5InitializeJVM函数53
2.2.6JNI_CreateJavaVM函数55
2.2.7调用Java主方法56
2.2.8JVM退出路径 56
2.3系统初始化57
2.3.1配置OS模块58
2.3.2配置系统属性60
2.3.3加载系统库61
2.3.4启动线程62
2.3.5vm_init_globals函数:初始化全局数据结构65
2.3.6init_globals函数:初始化全局模块65
2.4小结69

第3章类与对象70
3.1对象表示机制71
3.1.1OOP-Klass二分模型71
3.1.2Oops模块71
3.1.3OOP框架与对象访问机制73
3.1.4Klass与instanceKlass79
3.1.5实战:用HSDB调试HotSpot82
3.2类的状态转换87
3.2.1入口:Class文件87
3.2.2类的状态92
3.2.3加载96
3.2.4链接101
3.2.5初始化104
3.2.6实战:类的“族谱”107
3.2.7实战:系统字典111
3.3创建对象113
3.3.1实例对象的创建流程114
3.3.2实战:探测JVM内部对象116
3.4小结119

第4章运行时数据区120
4.1堆121
4.1.1Java的自动内存管理121
4.1.2堆的管理122
4.2线程私有区域125
4.2.1PC125
4.2.2JVM栈126
4.3方法区126
4.3.1纽带作用127
4.3.2常量池130
4.3.3常量池缓存:ConstantPoolCache133
4.3.4方法的表示:methodOop134
4.3.5方法的解析:将符号引用转换成直接引用138
4.3.6代码放在哪里:ConstMethodOop141
4.3.7实战:探测运行时常量池142
4.4性能监控数据区:Perf Data147
4.4.1描述这段空间:PerfMemory147
4.4.2查看148
4.4.3生产150
4.5转储151
4.5.1用VisualVM进行转储分析151
4.5.2JVM Crash153
4.6小结158

第5章垃圾收集159
5.1堆与GC160
5.1.1垃圾收集160
5.1.2分代收集162
5.1.3快速分配165
5.1.4栈上分配和逸出分析167
5.1.5GC公共模块167
5.2垃圾收集器170
5.2.1设计演进170
5.2.2CMS收集器175
5.2.3G1收集器180
5.3实战:性能分析方法184
5.3.1获取GC日志184
5.3.2GC监控信息187
5.3.3内存分析工具189
5.3.4选择合适的收集器与GC性能评估190
5.3.5不要忽略JVM Crash日志195
5.4小结196

第6章栈197
6.1硬件背景:了解真实机器198
6.1.1程序是如何运行的198
6.1.2x86与栈帧199
6.1.3ARM对Java硬件级加速:Jazelle技术202
6.2Java栈203
6.2.1寄存器式指令集与栈式指令集203
6.2.2HotSpot中的栈204
6.2.3栈帧207
6.2.4充分利用寄存器资源210
6.2.5虚拟机如何调用Java函数212
6.2.6优化:栈顶缓存221
6.2.7实战:操作数栈223
6.3小结228

第7章解释器和即时编译器229
7.1概述230
7.2解释器如何工作231
7.2.1Interpreter模块232
7.2.2Code模块234
7.2.3字节码表235
7.2.4Code Cache236
7.2.5InterpreterCodelet与Stub队列239
7.2.6Code生成器241
7.2.7模板表与转发表244
7.2.8实战:InterpreterCodelet247
7.3即时编译器250
7.3.1概述250
7.3.2编译器模块251
7.3.3编译器的基本结构252
7.3.4实战:编译原理实践,了解编译中间环节255
7.4小结267

第8章指令集268
8.1再说栈式指令集268
8.2数据传送270
8.2.1局部变量、常量池和操作数栈之间的数据传送270
8.2.2数据传送指令272
8.2.3实战:数组的越界检查277
8.3类型转换279
8.4对象的创建和操作281
8.5程序流程控制282
8.5.1控制转移指令282
8.5.2条件转移283
8.5.3无条件转移284
8.5.4复合条件转移285
8.5.5实战:switch语句如何使用String287
8.6运算290
8.6.1加法:iadd290
8.6.2取负:ineg291
8.7函数的调用和返回292
8.7.1Java函数分发机制:VTABLE与ITABLE293
8.7.2invoke系列指令297
8.7.3动态分发:覆盖299
8.7.4静态分发:重载302
8.8异常305
8.8.1异常表305
8.8.2创建异常306
8.8.3try-catch309
8.8.4finally311
8.9小结312

第9章虚拟机监控工具313
9.1Attach机制314
9.1.1AttachProvider与VirtualMachine314
9.1.2命令的下发:execute()317
9.1.3命令的执行:Attach Listener守护线程319
9.2查看JVM进程320
9.2.1用jps查看Java进程320
9.2.2实战:定制jps,允许查看库路径323
9.3查看和配置JVM326
9.3.1用jinfo查看JVM参数配置326
9.3.2实战:扩展flags选项,允许查看命令行参数330
9.4堆内存转储工具332
9.4.1Heap Dump332
9.4.2原理333
9.5堆转储分析337
9.5.1Heap Dump分析工具:jhat337
9.5.2实战:MAT分析过程340
9.6线程转储分析343
9.6.1jstack343
9.6.2实战:如何分析资源等待344
9.7小结347

Book Abstract

3.3.1 实例对象的创建流程
实例的创建过程,首先根据从类常量池中获取对象类型信息并验证类是否已被解析过,若确保该类已被加载和正确解析,使用快速分配(fast allocation)技术为该类分配对象空问;若该类尚未解析过,则只能通过慢速分配(slow allocation)方式分配实例对象。实例的创建流程如图3—30所示。
对象的创建基本流程如下所示。
(1)验证类已被解析。
(2)获取instanceKlass,确保klass已完全初始化。
(3)若满足快速分配条件,则进入快速分配流程。
(4)若不满足快速分配条件,或者快速分配失败,则进入慢速分配流程。
接下来,我们来看一下快速分配与慢速分配的区别和使用场景。
1.快速分配
如果在实例分配之前已经完成了类型的解析,那么分配操作仅仅是在内存空间中划分可用内存,因此能以较高效效率实现内存分配,故称为快速分配。
根据分配空间是来自于线程私有区域还是共享的堆空间,快速分配又可以分为两种空间选择策略。
HotSpot通过线程局部分配缓存技术(即Thread.Local Allocation Buffers,简称TLABs)可以在线程私有区域实现空间的分配。
注意可以通过VM选项UseTLAB来开启或关闭TLAB功能。
根据是否使用TLAB,快速分配方式有两种选择策略。
选择TLAB:首先尝试在TLAB中分配,因为TLAB是线程私有区域,故不需要加锁便能够保证线程安全。在分配一个新的对象空间时,将首先尝试在TLAB空间中分配对象空间,若分配空间的请求失败,则再尝试使用加锁机制在Eden区分配对象。
选择Eden空间:若失败,则尝试在共享的Eden区进行分配,Eden区是所有线程共享区域,需要保证线程安全,故采用原子操作进行分配。若分配失败,则再次尝试该操作,直到分配成功为止。

Specifications

Brand Jingdong book
Brand Origin China

Disclaimer

Product packaging, specifications and price are subject to change without notice. All information about the products on our website is provided for information purposes only. Please always read labels, warnings and directions provided with the product before use.

View Full Terms of Use
Add to favorites
{{ $isZh ? coupon.coupon_name_sub : coupon.coupon_ename_sub | formatCurrency }}
{{__("Buy Directly")}} {{ itemCurrency }}{{ item.directly_price }}
Quantity
{{ quantity }}
{{ instockMsg }}
{{ limitText }}
{{buttonTypePin == 3 ? __("Scan to view more PinGo") : __("Scan to start")}}
Sold by JD@CHINA
Ship to
{{ __("Ship to United States only") }}
Free shipping over 69
Genuine guarantee

Added to Cart

Keep Shopping

More to Consider

{{ item.brand_name }}

{{ item.item_name }}

{{ item.currency }}{{ item.market_price }}

{{ item.currency }}{{ item.unit_price }}

{{ item.currency }}{{ item.unit_price }}

Coupons

{{ coupon.coupon_name_new | formatCurrency }}
Clip Clipped Over
{{ getCouponDescStr(coupon) }}
{{ coupon.use_time_desc }}
Expires soon {{ formatTime(coupon.use_end_time) }}

Share this item with friends

Cancel

Yami Gift Card

Get this exclusive deal when paying with gift card

Terms and Conditions

Gift card deals are special offers for selected products;

The gift card deals will automatically be activated if a customer uses gift card balance at check out and the balance is sufficient to pay for the total price of the shopping cart products with gift card deals;

You will not be able to activate the gift card deals if you choose other payment methods besides gift card. The products will be purchased at their normal prices;

If your account balance is not enough to pay for the products with gift card deals, you can choose to reload your gift card balance by clicking on the Reload button at either shopping cart page or check out page;

Products that have gift card deals can be recognized by a special symbol showing 'GC Deal';

For any additional questions or concerns, please contact our customer service;

Yamibuy reserves the right of final interpretation.

Sold by Yami

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

Yami is committed to provide our customers with a peace of mind when purchasing from us. Most items shipped from Yamibuy.com can be returned within 30 days of receipt of shipment (For Food, Beverages, Snacks, Dry Goods, Health supplements, Fresh Grocery and Perishables Goods, within 7 days of receipt of shipment due to damages or quality issues; To ensure that every customer receives safe and high-quality products, we do not provide refunds or returns for beauty products once they have been opened or used, except in the case of quality issues; Some products may have different policies or requirements associated with them, please see below for products under special categories, or contact Yami Customer Service for further assistance).
Thank you for your understanding and support.

Learn More

Sold by Yami

Terms and Conditions of Yami E-Gift Card

If you choose “Redeem automatically” as your delivery method, your gift card balance will be reload automatically after your order has been processed successfully;

If you choose “Send to Email”as your delivery method, the card number and CVV will be sent to the email address automatically;

Any user can use the card number and CVV to redeem the gift card, please keep your gift card information safely. If you have any trouble receiving email, please contact Yami customer service;

Yami gift card can be used to purchase both Yami owned or Marketplace products;

Yami gift card will never expire;

Yami gift card balance does not have to be used up at once;

All rights reserved by Yami.

Return Policy

Gift card that has already been consumed is non-refundable.

Sold by JD@CHINA

Service Guarantee

Yami Free Shipping over $49
Yami Easy Returns
Yami Ships from United States

Shipping

  • United States

    Standard Shipping is $5.99 (Excluding Alaska & Hawaii). Free on orders of $49 or more.

    Local Express is $5.99 (Available in Parts of CA, NJ, MA & PA). Free on orders of $49 or more.

    2-Day Express (Includes Alaska & Hawaii) starts at $19.99.

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Sold by JD@CHINA

Service Guarantee

Yami Cross-store Free Shipping over $69
Yami 30-days Return

Yami-China FC

Yami has a consolidation warehouse in China which collects multiple sellers’ packages and combines to one order. Our Yami consolidation warehouse will directly ship the packages to your door. Cross-store free shipping over $69.

Return Policy

You may return products within 30 days upon receiving the products. Sellers take responsibilities for any wrong shipment or missing items. Packing needs to be unopened for any other than quality issues return. We promise to pack carefully, but because goods are taking long journey to destinations, simple damages to packaging may occur. Any damages not causing internal goods quality problems are not allowed to return. If you open the package and any quality problem is found, please contact customer service within three days after receipt of goods.

Shipping Information

Yami Consolidation Service Shipping Fee $9.99(Free shipping over $69)

Sellers in China will ship their orders within 1-2 business days once the order is placed. Packages are sent to our consolidation warehouse in China and combined there. Our Yami consolidation warehouse will directly ship the packages to you via UPS. The average time for UPS to ship from China to the United States is about 10 working days and it can be traced using the tracking number. Due to the pandemic, the delivery time may be delayed by about 5 days. The package needs to be signed by the guest. If the receipt is not signed, the customer shall bear the risk of loss of the package.

Sold by JD@CHINA

Service Guarantee

Free shipping over 69
Genuine guarantee

Shipping

Yami Consolidated Shipping $9.99(Free shipping over $69)


Seller will ship the orders within 1-2 business days. The logistics time limit is expected to be 7-15 working days. In case of customs clearance, the delivery time will be extended by 3-7 days. The final receipt date is subject to the information of the postal company.

Yami Points information

All items are excluding from any promotion or points events on Yamibuy.com

Return Policy

You may return product within 30 days upon receiving the product. Items returned must be new in it's original packing, including the original invoice for the purchase. Customer return product at their own expense.

Yami

Download the Yami App

Back Top

Recommended for You

About the brand

Jingdong book

为您推荐

Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折
Yami
欣葉
2种选择
欣叶 御大福 芋头麻薯 180g

周销量 600+

$1.66 $1.99 83折

Reviews{{'('+ commentList.posts_count + ')'}}

Have your say. Be the first to help other guests.

Write a review
{{ totalRating }} Write a review
  • {{i}} star

    {{i}} stars

    {{ parseInt(commentRatingList[i]) }}%

Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}
Yami Yami
{{ comment.user_name }}

{{ showTranslate(comment) }}Show Less

{{ strLimit(comment,800) }}Show more

Show Original

{{ comment.content }}

Yami
Show All

{{ formatTime(comment.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ comment.likes_count }} {{ comment.likes_count }} {{ comment.reply_count }} {{comment.in_user==uid ? __('Delete') : __('Report')}}

No related comment~

Review

Yami Yami

{{ showTranslate(commentDetails) }}Show Less

{{ strLimit(commentDetails,800) }}Show more

Show Original

{{ commentDetails.content }}

Yami
Show All

{{ formatTime(commentDetails.in_dtm) }} VERIFIED PURCHASE {{groupData}}

{{ commentDetails.likes_count }} {{ commentDetails.likes_count }} {{ commentDetails.reply_count }} {{commentDetails.in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Comments{{'(' + replyList.length + ')'}}

Yami Yami

{{ showTranslate(reply) }}Show Less

{{ strLimit(reply,800) }}Show more

Show Original

{{ reply.reply_content }}

{{ formatTime(reply.reply_in_dtm) }}

{{ reply.reply_likes_count }} {{ reply.reply_likes_count }} {{ reply.reply_reply_count }} {{reply.reply_in_user==uid ? __('Delete') : __('Report')}}

Please write at least one word

Cancel

That’s all the comments so far!

Write a review
How would you rate this item?

Please add your comment.

  • A nice nickname will make your comments more popular!
  • The nickname in your account will be changed to the same as here.
Thanks for your review
Our community rely on great reviews like yours to find the best of Asia.

Report

If you find this content inappropriate and think it should be removed from the Yami.com site, let us know please.

Cancel

Are you sure to delete your review?

Cancel

You’ve Recently Viewed

About the brand

Jingdong book