Troubleshooting Java, Video Edition

Video description

In Video Editions the narrator reads the book while the content, figures, code listings, diagrams, and text appear on the screen. Like an audiobook that you can also watch as a video.

Effectively reading and understanding existing code is a developer’s superpower. In this book, you’ll master techniques for code profiling, advanced debugging, and log evaluation to find and fix bugs and performance problems.

In Troubleshooting Java: Read, debug, and optimize JVM applications you will learn how to:

  • Determine what code does the first time you see it
  • Expose code logic problems
  • Evaluate heap dumps to find memory leaks
  • Monitor CPU consumption to optimize execution
  • Use thread dumps to find and solve deadlocks
  • Easily follow a service-oriented or microservices system
  • Properly use logging to better understand Java app execution
  • Use Java debuggers efficiently

Searching for bugs, detangling messy legacy code, or evaluating your codebase for new features sucks up much of a developer's time. Troubleshooting Java: Read, debug, and optimize JVM applications teaches code investigation techniques that will help you efficiently understand how Java apps work, how to optimize them, and how to fix the bugs that break them. You’ll go from the basics of debugging to advanced methods for locating problems in microservices architectures, and save yourself hours—or even days—of time. Each new technique is explained with lively illustrations and engaging real-world examples.

About the Technology
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.

About the Book
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.

What's Inside
  • Determine what code does the first time you see it
  • Evaluate heap dumps to find memory leaks
  • Monitor CPU consumption to optimize execution
  • Use thread dumps to find and solve deadlocks
  • Uncover glitches in code logic
  • Locate intermittent runtime problems


About the Reader
For intermediate Java developers.

About the Author
Laurențiu Spilcă is a skilled Java and Spring developer and an experienced technology instructor. He is the author of Spring Start Here and Spring Security in Action.

Quotes
We spend more time trying to understand code than writing it. This book shows you how to use that time wisely.
- Brent Honadel, Infor

Finally a book that illustrates how to troubleshoot and reason about Java apps in production! It just might save the day!
- Atul Shriniwas Khot, SquareOne Insights

I wish I had this collection of efficient and usable techniques at the beginning of my career.
- Andriy Stosyk, EPAM Systems

A great book with deep explanations about debugging techniques.
- Cătălin Matei, Endava

Understand how Java applications work under the hood.
- Fernando Bernardino, Wise

Table of contents

  1. Part 1. The basics of investigating a codebase
  2. Chapter 1. Revealing an app’s obscurities
  3. Chapter 1. Demystifying the unexpected output
  4. Chapter 1. Clarifying slowness
  5. Chapter 2, Understanding your app’s logic through debugging techniques
  6. Chapter 2. Investigating code with a debugger
  7. Chapter 2. What is the execution stack trace, and how do I use it?
  8. Chapter 2. Navigating code with the debugger
  9. Chapter 3. Finding problem root causes using advanced debugging techniques
  10. Chapter 3. Dynamically altering the investigation scenario
  11. Chapter 3. Rewinding the investigation case
  12. Chapter 4. Debugging apps remotely
  13. Chapter 4. Investigating in remote environments
  14. Chapter 4. Finding issues in remote environments
  15. Chapter 5. Making the most of logs: Auditing an app’s behavior
  16. Chapter 5. Using exception stack traces to identify what calls a method
  17. Chapter 5. Defining logging levels and using logging frameworks
  18. Chapter 5. Problems caused by logging and how to avoid them
  19. Part 2. Deep analysis of an app’s execution
  20. Chapter 6. Identifying resource consumption problems using profiling techniques
  21. Chapter 6. Using a profiler
  22. Chapter 6. Observing the CPU and memory usage
  23. Chapter 6. Identifying memory leaks
  24. Chapter 7. Finding hidden issues using profiling techniques
  25. Chapter 7. Sampling to observe executing code
  26. Chapter 7. Profiling to learn how many times a method executed
  27. Chapter 7. Using a profiler to retrieve SQL queries not generated by a framework
  28. Chapter 7. Using the profiler to get the SQL queries generated by a framework
  29. Chapter 7. Using the profiler to get programmatically generated SQL queries
  30. Chapter 8. Using advanced visualization tools for profiled data
  31. Chapter 8. Detecting problems with JDBC connections
  32. Chapter 8. Understanding the app’s code design using call graphs
  33. Chapter 9. Investigating locks in multithreaded architectures
  34. Chapter 9. Analyzing thread locks
  35. Chapter 9. Analyzing waiting threads
  36. Chapter 10. Investigating deadlocks with thread dumps
  37. Chapter 10. Reading thread dumps
  38. Chapter 10. Reading plain-text thread dumps
  39. Chapter 11. Finding memory-related issues in an app’s execution
  40. Chapter 11. Sampling and profiling for memory issues
  41. Chapter 11. Using heap dumps to find memory leaks
  42. Chapter 11. Reading a heap dump
  43. Chapter 11. Using the OQL console to query a heap dump
  44. Part 3. Finding problems in large systems
  45. Chapter 12. Investigating apps’ behaviors in large systems
  46. Chapter 12. Using HTTP client probes to observe HTTP requests the app sends
  47. Chapter 12. The relevance of integrated log monitoring
  48. Chapter 12. Using deployment tools in investigations
  49. Appendix A. Tools you’ll need
  50. Appendix B. Opening a project
  51. Appendix C. Recommended further reading
  52. Appendix D. Understanding Java threads
  53. Appendix D. Synchronizing threads
  54. Appendix D. Common issues in multithreaded architectures
  55. Appendix E. Memory management in Java apps
  56. Appendix E. The stack used by threads to store local data
  57. Appendix E. The heap the app uses to store object instances

Product information

  • Title: Troubleshooting Java, Video Edition
  • Author(s): Laurentiu Spilca
  • Release date: April 2023
  • Publisher(s): Manning Publications
  • ISBN: None