انتقل إلى المحتوى
أمين أبوزيد
درس مخطط لهMID-001-L06

عرض عملي: مراقبة JIT باستخدام -XX:+PrintCompilation

  • الدرس 6 من 6
  • Mid-level
في هذا الدرس 3 موضوعات

هذا الدرس مخطط له. يعرض المخطط أدناه الموضوعات التي سيغطيها، ولم يُنشر الدرس الكامل بعد.

نص الدروس والتمارين باللغة الإنجليزية، بينما تبقى واجهة الموقع وعناوين الدروس بالعربية.

في هذا الدرس

see compilation events live; prepares MID-001-LAB1.

تفاصيل المخطط المبدئي

خطوة بخطوة

  1. Write a loop calling a small pricing method a million times, timing batches.
  2. Run with -XX:+PrintCompilation; find the method's lines.
  3. Read the tier column (levels 1-4; level 4 is C2) and notice made not entrant lines (deoptimization).
  4. Print batch timings and match speed-ups to compilation events.
  5. Planned mistake: time a single cold call and conclude the method is slow. Fix: warm up first, then measure many iterations (or use JMH).
  6. Link to the lab: apply the same reasoning to the first 1,000 Shop checkout requests. Output format is version-specific; verify version before recording.

التطبيق

طبّق هذا الدرس بمختبر الوحدة وتمارينها واختبارها.

المختبر والتمارين الاختبار

تعليم الدرس كمكتمل اختياري ويمكنك التراجع عنه في أي وقت. يبقى تقدمك محفوظًا في هذا المتصفح.

اكتب للبحث في المستويات والمراحل والوحدات والدروس.