Posts

Showing posts from March, 2009

Observability of the Java Virtual Machine

Image
The JVM is one of the most observable runtimes. It provides us lots of tools for troubleshooting a JVM application in production. 1. Thread observability Threads are how the JVM actually does work. When something is wrong in production, the symptom is almost always a thread: stopped, blocked, leaking etc. Thread dumps work on any JVM with no  instrumentation, no agents, no restarts. <Example project link with /threaddump endpoint>         // (1) Deadlock — two threads grab the same pair of locks in opposite order.         new Thread(() -> grab(LOCK_A, LOCK_B), "deadlock-A-then-B").start();         new Thread(() -> grab(LOCK_B, LOCK_A), "deadlock-B-then-A").start(); http://localhost:8080/actuator/threaddump To list the JVMS, we can use the command below. PS C:\observe-jvm> jps -lv 25296 jdk.jcmd/sun.tools.jps.Jps -Dapplication.home=C:\Program Files\Microsoft\jdk-21.0.3.9-hotspot -Xms8m -Djdk.module.main=...

ANT ve Yazılım Projelerinin İnşası

Günümüzde kurumsal uygulamalar geliştirilirken yinelemeli (iterative) yöntemler kullanılıyor. Yani projenin geliştirme takvimi, yineleme (iterasyon) denilen kısımlara ayrılıyor ve her yinelemede çalışabilen bir ürünün çıkarılması hedefleniyor. Kaynak kod kontrol sistemleri (CVS, Subversion, Clearcase, Visual SourceSafe gibi) projenin kodlarını bir makinede saklarken, bir yandan da bu kodlardan ürün elde etmek için gereken işlemler düzenli olarak yapılıyor. Örneğin Java ortamına ilişkin bir ağ (web) uygulaması söz konusu ise, elde etmek istediğimiz ürün bir WAR dosyası olabilir. Microsoft geliştirme ortamında da genellikle Visual Studio üzerinden düzenli olarak "build" komutunu çalıştırıyoruz. Aynı şekilde "Build Solution", "Clean Solution" gibi komutlar çalıştırıyoruz. Burada Visual Studio ne yapıyor? Ant ve NAnt kütüphaneleri, her türlü projeyi inşa ederken yapılması gereken derleme, dosya kopyalama, dosya/dizin silme gibi işlemleri kolay bir biçimde tan...

Popular posts from this blog

The WeakReference class, monitoring memory leak and garbage collection in a Java application

Simplescalar Simulator - Part 2: sim-outorder.c

Notes on Java Performance