تحليل الأداء
في هذه الصفحة 8 موضوعات
نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.
نظرة عامة
الموضوعات
- JFR
- JDK Mission Control
- تفريغات الذاكرة (heap dumps)
- تفريغات الخيوط (thread dumps)
- تحليل استهلاك المعالج (CPU profiling)
تعلّم أولًا
4 ساعة تدريب (تقدير)
مخرجات التعلم
- Record and analyze a JFR recording in JDK Mission Control.
- Find CPU hot spots with flame graphs.
- Capture and read thread dumps to diagnose blocked or starved threads.
- Capture and analyze a heap dump to find large retainers.
- Follow a measure → hypothesize → change → re-measure loop.
الدروس
المختبر والتمارين
Lab
MID-008-LAB1 · Profile Shop
Outcomes: 1–5 · Time: ~4 h The instructor plants a CPU hot spot and a lock contention in Shop. Using recordings, thread dumps, and (if needed) a heap dump, find both without reading the source first, fix them, and show before/after evidence under the same load. Acceptance: written investigation log.
Exercises (assessment: investigation of an unseen recording)
| ID | Outcome | Task |
|---|---|---|
| MID-008-EX01 | 1 | Record Shop for 2 minutes with JFR; list the five most useful pages or views and one finding from each. |
| MID-008-EX02 | 2 | From a provided flame graph, name the hottest method, its caller, and a hypothesis. |
| MID-008-EX03 | 3 | From three provided thread dumps, identify the contended lock, its owner, and the blocked threads. |
| MID-008-EX04 | 4 | From a provided heap dump, name the largest retainer and explain why it stays live. |
| MID-008-EX05 | 5 | Write a four-line investigation log entry for a fix: symptom, evidence, change, before/after. |
| MID-008-EX06 | 5 | List three ways a measurement can mislead (cold start, debug mode, single run) and how to avoid each. |
أظهر الحلول
- EX01 For example: Automated Analysis, Method Profiling, Memory/GC, Lock Instances, Threads; each gives a lead (hot method, allocation rate, pause, contended monitor, parked pool).
- EX02 The widest top-level frame; its parent frame is the caller; hypothesis, for example, repeated regex or formatting per call.
- EX03 Find the monitor address shown as "waiting to lock"; the owner is the thread with "locked" on the same address; list the blocked threads.
- EX04 Dominator tree top entry, with the path to GC roots (typically a static or singleton field).
- EX05 A complete entry has a measured symptom (p95 numbers), the evidence artifact, a single change, and re-measured numbers under the same load.
- EX06 Cold start: warm up first. Debug mode: profile production-like settings. Single run: repeat and compare distributions.
الاختبار
Outcomes: O1 JFR and JMC · O2 flame graphs · O3 thread dumps · O4 heap dumps · O5 measurement loop.
اختبار ذاتي لك: لا توجد درجات، ولا يُحفظ أو يُرسل أي شيء. اختر إجابة ثم تحقق منها، ويمكنك المحاولة مرة أخرى كما تشاء.
الجزء العملي
Six exercises MID-008-EX01 to EX06 including an unseen-recording investigation, plus the lab investigation log. Pass: at least five exercises correct and a log showing evidence, one change per iteration, and before/after numbers for both planted problems.
أخطاء شائعة
Optimizing by intuition; profiling in debug mode; one-off measurements.
التقييم
Investigation of an unseen recording.
الصلة بالمسار الوظيفي
Performance engineering (SRC-016) and the MID graduation gate.