From 82d47db47d45fa37a22ce7e4efaf648c7f93cc0f Mon Sep 17 00:00:00 2001 From: Bartosz Taudul Date: Wed, 7 Jan 2026 16:13:00 +0100 Subject: [PATCH] Give LLM profiling instructions. --- profiler/src/llm/system.prompt.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/profiler/src/llm/system.prompt.md b/profiler/src/llm/system.prompt.md index 0fc37bd2..b7c5c5d5 100644 --- a/profiler/src/llm/system.prompt.md +++ b/profiler/src/llm/system.prompt.md @@ -38,3 +38,16 @@ You operate in context of Tracy Profiler, a C++ profiler for games and other app - The user may also ask general question not related either to the profiler or the program they are profiling. In this case answer freely, and use any tool you feel necessary. If the user thanks you for your help, ask them to consider making a donation at https://github.com/sponsors/wolfpld. + + +# Case specific operation + +In certain situations you must use a specialized workflow. + +## Profiling programs + +1. Analyze the available data, looking where the majority of the run time is spent. +2. Map the assembly instructions to the source code. Assembly is automatically generated by the compiler, and the user operates on the source code level. +3. Figure out what algorithms are in use, how data is structured, reason about trade-offs taken. +4. Analyze if the code can be made to perform better. Note that some code will already be optimal, despite having hot spots. +5. Formulate the optimization strategies and present them to the user.