没有合适的资源?快使用搜索试试~ 我知道了~
TroubleshootingJavaReaddebugandoptimizeJVMapplications.pdf
需积分: 5 0 下载量 194 浏览量
2023-09-06
10:46:14
上传
评论
收藏 33.89MB PDF 举报
温馨提示
试读
329页
TroubleshootingJavaReaddebugandoptimizeJVMapplications.pdf
资源推荐
资源详情
资源评论
MANNING
Laurent
¸
iu Spilca
˘
Read, debug, and optimize JVM applications
Java
TROUBLESHOOTING
and
optimize
JVM
applications
Tips for applying investigation techniques
Always look for the root cause of a problem before deciding how to solve it. Focusing on
the apparent problem might only be sweeping it under the rug.
An exception thrown at run time is not always in itself the problem. It could be a conse-
quence of the real problem. Always look for the root cause.
No one investigation technique applies to every troubleshooting situation. Remember that
for most scenarios, you'll have to apply a combination of investigation techniques.
The more you are aware of all the investigation techniques, the easier it will be for you to
find the proper combination to quickly solve a scenario.
In most cases, complex investigation techniques can help, but always remember that some-
times a simple log line in the right place can do miracles.
Sometimes a good night’s sleep is better than any troubleshooting technique.
In an app that behaves normally,
you will see this type of a pattern.
The memory fills, and at a certain
point the GC cleans the unneeded
data, freeing up the memory.
These are moments in which the GC
cleaned the unneeded data, making
space for new data to be added in
memory.
When an app has a memory leak,
you will see the used memory
continuously grows. The GC makes
efforts to free the memory but can’t
deallocate enough objects since the
app holds the references for most
of them.
Normal behavior
Abnormal behavior
Troubleshooting Java
READ, DEBUG, AND OPTIMIZE JVM APPLICATIONS
LAURENŢIU SPILCĂ
MANNING
SHELTER ISLAND
For online information and ordering of this and other Manning books, please visit
www.manning.com. The publisher offers discounts on this book when ordered in quantity.
For more information, please contact
Special Sales Department
Manning Publications Co.
20 Baldwin Road
PO Box 761
Shelter Island, NY 11964
Email: orders@manning.com
©2023 by Manning Publications Co. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted, in
any form or by means electronic, mechanical, photocopying, or otherwise, without prior written
permission of the publisher.
Many of the designations used by manufacturers and sellers to distinguish their products are
claimed as trademarks. Where those designations appear in the book, and Manning
Publications was aware of a trademark claim, the designations have been printed in initial caps
or all caps.
Recognizing the importance of preserving what has been written, it is Manning’s policy to have
the books we publish printed on acid-free paper, and we exert our best efforts to that end.
Recognizing also our responsibility to conserve the resources of our planet, Manning books are
printed on paper that is at least 15 percent recycled and processed without the use of elemental
chlorine.
The author and publisher have made every effort to ensure that the information in this book
was correct at press time. The author and publisher do not assume and hereby disclaim any
liability to any party for any loss, damage, or disruption caused by errors or omissions, whether
such errors or omissions result from negligence, accident, or any other cause, or from any usage
of the information herein.
Manning Publications Co. Development editor: Marina Michaels
20 Baldwin Road Technical development editor: Nick Watts
PO Box 761 Review editor: Marina Michaels
Shelter Island, NY 11964 Production editor: Deirdre S. Hiam
Copy editor: Michele Mitchell
Proofreader: Katie Tennant
Technical proofreader: Jean-François Morin
Typesetter: Gordan Salinovic
Cover designer: Marija Tudor
ISBN 9781617299773
Printed in the United States of America
iii
contents
preface vii
acknowledgments ix
about this book xi
about the author xiv
about the cover illustration xv
PART 1 THE BASICS OF INVESTIGATING A CODEBASE .................1
1
Revealing an app’s obscurities 3
1.1 How to more easily understand your app 4
1.2 Typical scenarios for using investigation techniques 7
Demystifying the unexpected output 8
■
Learning certain
technologies 13
■
Clarifying slowness 13
■
Understanding app
crashes 15
■
What you will learn in this book 17
2
Understanding your app’s logic through debugging
techniques 19
2.1 When analyzing code is not enough 21
2.2 Investigating code with a debugger 24
What is the execution stack trace, and how do I use it? 29
Navigating code with the debugger 34
2.3 When using the debugger might not be enough 40
剩余328页未读,继续阅读
资源评论
MQ-Kenny
- 粉丝: 0
- 资源: 42
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功