Commit cc60b7f
committed
Add StartupTrace instrumentation to platform startup paths
Adds org.eclipse.core.internal.runtime.StartupTrace, a java-only,
always-on span recorder that drains buffered entries to
~/.eclipse/startup-trace.csv on a 2-second periodic daemon, on explicit
flush() calls, and on a JVM shutdown hook. Prints a diagnostic line on
every successful write and a top-40 cumulative-time summary at shutdown.
Single shared queue and runId across every caller, so contributions from
any bundle that Require-Bundles core.runtime land in one CSV per run.
The class lives in core.runtime rather than equinox.common so that its
inclusion in the built jar is not defeated by Tycho baseline-replace.
When the CSV is first created, an AI analysis prompt is written above
the column header (each line prefixed with '# ' so the body is still
filterable as 'grep -v ^# startup-trace.csv'). The prompt instructs a
large-context model (e.g. Gemini) to fold the raw rows into a per-run
Markdown summary suitable as input for a second AI doing bottleneck
analysis: top phases, hot leaves, parent-vs-children gaps, outliers,
and cross-run variance. Lets the file be copy-pasted directly into the
AI engine without any extra context.
API:
- StartupTrace.begin() / record(name, t0) for timed spans
- StartupTrace.mark(name) for zero-duration checkpoints (used to
capture instantaneous events like 'startup complete' where the
timestamp matters, not a duration)
Instrumented call sites:
- InternalPlatform.start with sub-spans for openOSGiTrackers (one per
ServiceTracker.open), processCommandLine, initializeDebugFlags,
initializeAuthorizationHandler, initializeSSLContext (TrustManager
init, KeyManager init, SSLContext.getDefault), startServices.
- ResourcesPlugin.start (total) with sub-spans for super.start,
registerDebugOptions, openInstanceLocationTracker. The tracker span
is further sub-divided into open instance Location, new Workspace,
and register workspace with platform.
- Workspace.open with sub-spans for setExplicitWorkspaceEncoding,
initializePreferenceLookupOrder, inner startup, notification-manager
restart, and crash-recovery refresh.
- Workspace.startup: individual span per manager (WorkManager,
FileSystemResourceManager, PathVariableManager, NatureManager,
FilterTypeManager, BuildManager, NotificationManager, MarkerManager,
SaveManager, PropertyManager2, CharsetManager,
ContentDescriptionManager, RefreshManager, AliasManager).
- SaveManager.restore with sub-spans for restoreMasterTable,
restoreTree (open DataInputStream, readTree), restoreSnapshots,
restoreMarkers (readSnapshot, per-project readDelta loop),
restoreSyncInfo, restoreMetaInfo (per-project loadMetaInfo loop),
and the per-project Project.startup loop.
Local-only; not intended for upstream merge.1 parent b885e3b commit cc60b7f
6 files changed
Lines changed: 471 additions & 0 deletions
File tree
- resources/bundles/org.eclipse.core.resources/src/org/eclipse/core
- internal/resources
- resources
- runtime/bundles/org.eclipse.core.runtime/src/org/eclipse/core/internal/runtime
Lines changed: 28 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
66 | 66 | | |
67 | 67 | | |
68 | 68 | | |
| 69 | + | |
69 | 70 | | |
70 | 71 | | |
71 | 72 | | |
| |||
790 | 791 | | |
791 | 792 | | |
792 | 793 | | |
| 794 | + | |
793 | 795 | | |
794 | 796 | | |
795 | 797 | | |
| |||
804 | 806 | | |
805 | 807 | | |
806 | 808 | | |
| 809 | + | |
| 810 | + | |
807 | 811 | | |
| 812 | + | |
808 | 813 | | |
| 814 | + | |
809 | 815 | | |
| 816 | + | |
| 817 | + | |
810 | 818 | | |
| 819 | + | |
811 | 820 | | |
812 | 821 | | |
813 | 822 | | |
| 823 | + | |
814 | 824 | | |
815 | 825 | | |
816 | 826 | | |
817 | 827 | | |
818 | 828 | | |
| 829 | + | |
| 830 | + | |
819 | 831 | | |
820 | 832 | | |
821 | 833 | | |
822 | 834 | | |
823 | 835 | | |
| 836 | + | |
824 | 837 | | |
| 838 | + | |
825 | 839 | | |
| 840 | + | |
| 841 | + | |
826 | 842 | | |
827 | 843 | | |
828 | 844 | | |
829 | 845 | | |
| 846 | + | |
830 | 847 | | |
831 | 848 | | |
832 | 849 | | |
| |||
835 | 852 | | |
836 | 853 | | |
837 | 854 | | |
| 855 | + | |
838 | 856 | | |
839 | 857 | | |
840 | 858 | | |
| |||
923 | 941 | | |
924 | 942 | | |
925 | 943 | | |
| 944 | + | |
926 | 945 | | |
| 946 | + | |
927 | 947 | | |
928 | 948 | | |
929 | 949 | | |
| |||
934 | 954 | | |
935 | 955 | | |
936 | 956 | | |
| 957 | + | |
937 | 958 | | |
938 | 959 | | |
939 | 960 | | |
940 | 961 | | |
941 | 962 | | |
| 963 | + | |
942 | 964 | | |
943 | 965 | | |
944 | 966 | | |
| |||
977 | 999 | | |
978 | 1000 | | |
979 | 1001 | | |
| 1002 | + | |
980 | 1003 | | |
981 | 1004 | | |
982 | 1005 | | |
| |||
986 | 1009 | | |
987 | 1010 | | |
988 | 1011 | | |
| 1012 | + | |
989 | 1013 | | |
990 | 1014 | | |
991 | 1015 | | |
| |||
1160 | 1184 | | |
1161 | 1185 | | |
1162 | 1186 | | |
| 1187 | + | |
1163 | 1188 | | |
| 1189 | + | |
| 1190 | + | |
1164 | 1191 | | |
| 1192 | + | |
1165 | 1193 | | |
1166 | 1194 | | |
1167 | 1195 | | |
| |||
Lines changed: 46 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
65 | 65 | | |
66 | 66 | | |
67 | 67 | | |
| 68 | + | |
68 | 69 | | |
69 | 70 | | |
70 | 71 | | |
| |||
2342 | 2343 | | |
2343 | 2344 | | |
2344 | 2345 | | |
| 2346 | + | |
2345 | 2347 | | |
2346 | 2348 | | |
2347 | 2349 | | |
| |||
2359 | 2361 | | |
2360 | 2362 | | |
2361 | 2363 | | |
| 2364 | + | |
2362 | 2365 | | |
| 2366 | + | |
2363 | 2367 | | |
| 2368 | + | |
2364 | 2369 | | |
| 2370 | + | |
2365 | 2371 | | |
2366 | 2372 | | |
2367 | 2373 | | |
2368 | 2374 | | |
| 2375 | + | |
2369 | 2376 | | |
| 2377 | + | |
2370 | 2378 | | |
| 2379 | + | |
2371 | 2380 | | |
| 2381 | + | |
2372 | 2382 | | |
2373 | 2383 | | |
| 2384 | + | |
2374 | 2385 | | |
2375 | 2386 | | |
2376 | 2387 | | |
| 2388 | + | |
| 2389 | + | |
2377 | 2390 | | |
2378 | 2391 | | |
2379 | 2392 | | |
2380 | 2393 | | |
| 2394 | + | |
2381 | 2395 | | |
2382 | 2396 | | |
2383 | 2397 | | |
2384 | 2398 | | |
| 2399 | + | |
2385 | 2400 | | |
2386 | 2401 | | |
2387 | 2402 | | |
| |||
2654 | 2669 | | |
2655 | 2670 | | |
2656 | 2671 | | |
| 2672 | + | |
2657 | 2673 | | |
2658 | 2674 | | |
| 2675 | + | |
| 2676 | + | |
2659 | 2677 | | |
2660 | 2678 | | |
| 2679 | + | |
| 2680 | + | |
2661 | 2681 | | |
2662 | 2682 | | |
| 2683 | + | |
| 2684 | + | |
2663 | 2685 | | |
2664 | 2686 | | |
| 2687 | + | |
| 2688 | + | |
2665 | 2689 | | |
2666 | 2690 | | |
| 2691 | + | |
| 2692 | + | |
2667 | 2693 | | |
2668 | 2694 | | |
| 2695 | + | |
| 2696 | + | |
2669 | 2697 | | |
2670 | 2698 | | |
| 2699 | + | |
| 2700 | + | |
2671 | 2701 | | |
2672 | 2702 | | |
| 2703 | + | |
| 2704 | + | |
2673 | 2705 | | |
2674 | 2706 | | |
| 2707 | + | |
| 2708 | + | |
2675 | 2709 | | |
2676 | 2710 | | |
2677 | 2711 | | |
| 2712 | + | |
| 2713 | + | |
2678 | 2714 | | |
2679 | 2715 | | |
| 2716 | + | |
| 2717 | + | |
2680 | 2718 | | |
2681 | 2719 | | |
| 2720 | + | |
| 2721 | + | |
2682 | 2722 | | |
2683 | 2723 | | |
| 2724 | + | |
2684 | 2725 | | |
2685 | 2726 | | |
2686 | 2727 | | |
| 2728 | + | |
2687 | 2729 | | |
2688 | 2730 | | |
| 2731 | + | |
2689 | 2732 | | |
| 2733 | + | |
2690 | 2734 | | |
2691 | 2735 | | |
| 2736 | + | |
2692 | 2737 | | |
2693 | 2738 | | |
2694 | 2739 | | |
2695 | 2740 | | |
| 2741 | + | |
2696 | 2742 | | |
2697 | 2743 | | |
2698 | 2744 | | |
| |||
Lines changed: 15 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| 28 | + | |
28 | 29 | | |
29 | 30 | | |
30 | 31 | | |
| |||
549 | 550 | | |
550 | 551 | | |
551 | 552 | | |
| 553 | + | |
| 554 | + | |
552 | 555 | | |
| 556 | + | |
553 | 557 | | |
554 | 558 | | |
| 559 | + | |
555 | 560 | | |
556 | 561 | | |
557 | 562 | | |
558 | 563 | | |
| 564 | + | |
559 | 565 | | |
560 | 566 | | |
561 | 567 | | |
562 | 568 | | |
563 | 569 | | |
564 | 570 | | |
| 571 | + | |
565 | 572 | | |
| 573 | + | |
| 574 | + | |
566 | 575 | | |
567 | 576 | | |
568 | 577 | | |
| |||
579 | 588 | | |
580 | 589 | | |
581 | 590 | | |
| 591 | + | |
582 | 592 | | |
| 593 | + | |
583 | 594 | | |
584 | 595 | | |
585 | 596 | | |
586 | 597 | | |
587 | 598 | | |
| 599 | + | |
588 | 600 | | |
| 601 | + | |
589 | 602 | | |
590 | 603 | | |
591 | 604 | | |
592 | 605 | | |
593 | 606 | | |
594 | 607 | | |
| 608 | + | |
595 | 609 | | |
| 610 | + | |
596 | 611 | | |
597 | 612 | | |
598 | 613 | | |
| |||
0 commit comments