My Account Log in

1 option

Troubleshooting Java : read, debug, and optimize JVM applications / Laurentiu Spilcă.

O'Reilly Online Learning: Academic/Public Library Edition Available online

View online
Format:
Book
Author/Creator:
Spilcă, Laurenţiu, author.
Language:
English
Subjects (All):
Java (Computer program language).
Debugging in computer science.
Physical Description:
1 online resource (xv, 309 pages) : illustrations
Place of Publication:
Shelter Island, NY : Manning Publications Co., [2023]
Summary:
Fact: Over the course of your career, you'll spend far more time reading code than you will writing it. The code investigation skills in this book will radically improve your efficiency in understanding and improving Java applications. "Troubleshooting Java: read, debug, and optimize JVM applications" presents practical techniques for exploring and repairing unfamiliar code. In it, you'll learn timesaving practices for discovering hidden dependencies, discovering the root causes of crashes, and interpreting unexpected results. Go beyond profiling and debugging and start understanding how Java applications really work.
Contents:
Intro
inside front cover
Tips for applying investigation techniques
Troubleshooting Java
Copyright
contents
front matter
preface
acknowledgments
about this book
Who should read this book
How this book is organized: A roadmap
About the code
liveBook discussion forum
Author online
about the author
about the cover illustration
Part 1. The basics of investigating a codebase
1 Revealing an app's obscurities
1.1 How to more easily understand your app
1.2 Typical scenarios for using investigation techniques
1.2.1 Demystifying the unexpected output
1.2.2 Learning certain technologies
1.2.3 Clarifying slowness
1.2.4 Understanding app crashes
1.3 What you will learn in this book
Summary
2 Understanding your app's logic through debugging techniques
2.1 When analyzing code is not enough
2.2 Investigating code with a debugger
2.2.1 What is the execution stack trace, and how do I use it?
2.2.2 Navigating code with the debugger
2.3 When using the debugger might not be enough
3 Finding problem root causes using advanced debugging techniques
3.1 Minimizing investigation time with conditional breakpoints
3.2 Using breakpoints that don't pause the execution
3.3 Dynamically altering the investigation scenario
3.4 Rewinding the investigation case
4 Debugging apps remotely
4.1 What is remote debugging?
4.2 Investigating in remote environments
4.2.1 The scenario
4.2.2 Finding issues in remote environments
5 Making the most of logs: Auditing an app's behavior
5.1 Investigating issues with logs
5.1.1 Using logs to identify exceptions
5.1.2 Using exception stack traces to identify what calls a method
5.1.3 Measuring time spent to execute a given instruction.
5.1.4 Investigating issues in multithreaded architectures
5.2 Implementing logging
5.2.1 Persisting logs
5.2.2 Defining logging levels and using logging frameworks
5.2.3 Problems caused by logging and how to avoid them
5.3 Logs vs. remote debugging
Part 2. Deep analysis of an app's execution
6 Identifying resource consumption problems using profiling techniques
6.1 Where would a profiler be useful?
6.1.1 Identifying abnormal usage of resources
6.1.2 Finding out what code executes
6.1.3 Identifying slowness in an app's execution
6.2 Using a profiler
6.2.1 Installing and configuring VisualVM
6.2.2 Observing the CPU and memory usage
6.2.3 Identifying memory leaks
7 Finding hidden issues using profiling techniques
7.1 Sampling to observe executing code
7.2 Profiling to learn how many times a method executed
7.3 Using a profiler to identify SQL queries an app executes
7.3.1 Using a profiler to retrieve SQL queries not generated by a framework
7.3.2 Using the profiler to get the SQL queries generated by a framework
7.3.3 Using the profiler to get programmatically generated SQL queries
8 Using advanced visualization tools for profiled data
8.1 Detecting problems with JDBC connections
8.2 Understanding the app's code design using call graphs
8.3 Using flame graphs to spot performance problems
8.4 Analyzing queries on NoSQL databases
9 Investigating locks in multithreaded architectures
9.1 Monitoring threads for locks
9.2 Analyzing thread locks
9.3 Analyzing waiting threads
10 Investigating deadlocks with thread dumps
10.1 Getting a thread dump
10.1.1 Getting a thread dump using a profiler
10.1.2 Generating a thread dump from the command line
10.2 Reading thread dumps.
10.2.1 Reading plain-text thread dumps
10.2.2 Using tools to better grasp thread dumps
11 Finding memory-related issues in an app's execution
11.1 Sampling and profiling for memory issues
11.2 Using heap dumps to find memory leaks
11.2.1 Obtaining a heap dump
11.2.2 Reading a heap dump
11.2.3 Using the OQL console to query a heap dump
Part 3. Finding problems in large systems
12 Investigating apps' behaviors in large systems
12.1 Investigating communication between services
12.1.1 Using HTTP server probes to observe HTTP requests
12.1.2 Using HTTP client probes to observe HTTP requests the app sends
12.1.3 Investigating low-level events on sockets
12.2 The relevance of integrated log monitoring
12.3 Using deployment tools in investigations
12.3.1 Using fault injection to mimic hard-to-replicate issues
12.3.2 Using mirroring to facilitate testing and error detection
Appendix A. Tools you'll need
Appendix B. Opening a project
Appendix C. Recommended further reading
Appendix D. Understanding Java threads
D.1 What is a thread?
D.2 A thread's life cycle
D.3 Synchronizing threads
D.3.1 Synchronized blocks
D.3.2 Using wait(), notify(), and notifyAll()
D.3.3 Joining threads
D.3.4 Blocking threads for a defined time
D.3.5 Synchronizing threads with blocking objects
D.4 Common issues in multithreaded architectures
D.4.1 Race conditions
D.4.2 Deadlocks
D.4.3 Livelocks
D.4.4 Starvation
D.5 Further reading
Appendix E. Memory management in Java apps
E.1 How the JVM organizes an app's memory
E.2 The stack used by threads to store local data
E.3 The heap the app uses to store object instances
E.4 The metaspace memory location for storing data types
index
inside back cover.
Notes:
Includes index.
Description based on print version record.
ISBN:
9781638351863
1638351864
OCLC:
1375294309

The Penn Libraries is committed to describing library materials using current, accurate, and responsible language. If you discover outdated or inaccurate language, please fill out this feedback form to report it and suggest alternative language.

Find

Home Release notes

My Account

Shelf Request an item Bookmarks Fines and fees Settings

Guides

Using the Find catalog Using Articles+ Using your account