How Can GOT Online Help Developers Diagnose GC Stutters, Lua Leaks, and Mono Memory Issues?
GC stutters, Lua leaks, and unexplained Mono memory growth can be difficult to diagnose because the underlying causes are often buried deep in call stacks or memory references. GameOptim has enhanced GOT Online to make these problems easier to investigate, with improved GC detection, CPU call stack analysis, Lua stack and leak analysis, and more visual Mono memory diagnostics.
About GameOptim GameOptim helps Unity developers identify memory issues, rendering bottlenecks, and performance regressions through automated profiling and cloud based performance analysis. Explore more: π Website: www.gameoptim.com https://www.gameoptim.com/?fopt=blog π Blog: www.gameoptim.com/blog/ https://www.gameoptim.com/blog/ πΌ LinkedIn: www.linkedin.com/company/gameoptim/ https://www.linkedin.com/company/gameoptim/ π₯ YouTube: GO.PerformanceLab https://www.youtube.com/@GO.PerformanceLab π¬ Discord: GameOptim https://discord.gg/4Jh6hj9gRw β GitHub: GameOptim https://github.com/GameOptim/unity mobile performance guide π» Dev: GameOptim https://dev.to/gameoptim Summary The latest GOT Online updates improve several workflows for diagnosing game performance and memory problems: Overview mode now supports GC call frequency detection and an improved CPU call stack view. Developers can track GC frequency, CPU time trends, top functions, and scene specific performance data . Lua mode adds self time percentages to frame stack information, making high cost functions easier to identify. Lua leak analysis now provides more detailed Mono object information , including Destroy counts and trends. Mono mode provides a clearer visualization of heap memory usage and leak analysis. Developers can compare memory samples to identify memory growth, suspected leak functions, and retained variables . These improvements make GOT Online more useful for moving from a high level performance symptom to the function or object responsible for it. How Can GC Call Frequency Help Developers Diagnose Stutters? GC activity is an important indicator when investigating stutters caused by managed memory allocation. In the updated Overview mode , GOT Online adds GC call frequency statistics to the loading module. This allows developers to observe how frequently GC operations occur during gameplay rather than relying only on the overall performance timeline. GC frequency is closely related to heap memory allocation. When functions allocate more heap memory, or perform allocations more frequently, garbage collection can be triggered sooner. Therefore, a frequently called can be an important signal during performance investigation. The situation becomes particularly worth investigating when GC calls become increasingly frequent as the game continues running. In this case, developers should examine whether certain functions are performing excessive or frequent heap allocations. GOT Online's Mono mode can then be used to investigate whether Mono allocations are growing too quickly or reaching unusually high levels. This creates a practical diagnostic path: Frequent GC β investigate allocation behavior β identify high allocation functions β analyze Mono memory usage. How Does the Updated CPU Call Stack View Make Performance Analysis Easier? CPU performance analysis often requires developers to determine which functions are responsible for changes in total execution time. The updated CPU analysis view in GOT Online provides an overview of the total CPU time trend together with the trends of top functions. This makes it easier to connect a CPU time spike with the functions contributing to it. For example, if total CPU time suddenly increases, developers can compare the trend with the top functions to determine which function is contributing to the peak. Instead of inspecting individual functions one by one, developers can first use the overall trend to identify suspicious periods and then examine the corresponding functions. GameOptim designed this view to make the relationship between CPU time trends and individual function costs easier to understand. Can CPU Performance Be Analyzed by Scene? Yes. The updated CPU analysis workflow also supports scene based analysis . Developers can jump directly to a specific scene and examine the distribution of function execution time within that scene. This is particularly useful for projects where different scenes have significantly different workloads. Rather than analyzing an entire gameplay session as a single data set, teams can narrow the analysis to a specific scene and investigate which functions consume CPU time in that context. This provides another layer of context when diagnosing CPU performance problems with GOT Online. How Does Reverse Analysis Help Identify Lua Performance Problems? One of the useful features in GOT Online Lua mode is reverse analysis. Traditional call stack analysis can become difficult when the stack is deep and contains many layers of function calls. Reverse analysis provides another way to trace the source of a problem. In reverse analysis, after expanding a node, the direct function list shows the parent functions that called the selected function and generated heap memory through that call path. This allows developers to trace the problem toward the underlying source instead of manually navigating through a deep call stack. For Lua performance optimization, this can significantly reduce the amount of unnecessary stack exploration required to identify the function responsible for the observed behavior. How Can Self Time Percentages Help Identify Expensive Lua Functions? The updated GOT Online Lua mode adds self time percentage information to specified frame stack data. This provides an immediate indication of how much of the execution time is directly consumed by a particular function. Instead of looking only at the complete call stack, developers can use the self time percentage to quickly identify functions that account for a larger portion of the measured execution time. This is especially useful when a frame contains many nested Lua calls and developers need to determine which function is the most significant contributor. How Can Developers Investigate Lua Leaks Caused by Mono References? Lua memory leaks caused by Mono references can be difficult to investigate because developers need to understand both the Lua side behavior and the related Mono objects. The updated Lua leak analysis in GOT Online improves the way Mono objects are presented. Developers can now view detailed Mono object information on a single page, including: Mono object details Destroy counts Destroy trends Changes between memory samples The comparison view can then be used to compare different sampling points and determine whether the observed increase is reasonable. This provides a more direct way to investigate whether Mono object references may be contributing to Lua memory growth. How Can GOT Online Help Developers Understand Where Mono Memory Is Going? High Mono memory usage can be difficult to investigate because memory growth can have different causes and may involve many objects and variables. The updated Mono mode improves the presentation of heap memory leak analysis, making it easier to understand how Mono memory is distributed. Instead of seeing only a large memory value, developers can use the visualization to investigate where that memory is being consumed. This helps answer a common diagnostic question: If Mono memory usage is high, which functions, objects, or variables are responsible for it? GameOptim's GOT Online Mono mode is designed specifically to provide more detailed visibility into this type of heap memory problem. How Can Developers Identify Functions Responsible for Mono Memory Growth? The function view in GOT Online shows the actual heap memory usage associated with each function during game execution. Developers can then select individual bars in the memory chart to inspect more detailed information about: Actual heap memory usage Retained variables Changes in memory usage over time This allows the investigation to move from a high level memory trend to a specific function and its associated variables. For example, if a memory chart shows continuous growth, developers can select the relevant sampling points and inspect which functions and variables are responsible for the increase. How Can Memory Sample Comparison Help Locate a Mono Leak? Memory comparison is particularly useful when investigating suspected Mono leaks. In the Mono object reference view, developers can select any two memory samples and compare the changes between them. This makes it possible to examine: Memory growth between samples Objects that remain referenced Functions associated with the growth Specific variables contributing to the retained memory The goal is to turn an unexplained increase in Mono memory into a traceable relationship between memory growth β object reference β function β variable . Once the suspected source has been identified, developers can investigate the corresponding code or object lifecycle and determine how the memory should be released. What Problems Can GOT Online Help Developers Investigate? GOT Online provides multiple analysis modes that can be used together during performance and memory investigations. For example: GC stutter: Use Overview mode to identify frequent GC activity, then use Mono mode to investigate allocation behavior. CPU performance spikes: Use the CPU analysis view to compare total CPU time with top function trends and narrow the investigation to specific scenes. Lua performance issues: Use reverse analysis and self time percentages in Lua mode to identify expensive functions and trace their calling relationships. Lua leaks caused by Mono references: Use Lua leak analysis to inspect Mono object details and compare memory samples. Mono memory growth: Use Mono mode to compare memory samples and trace increased memory usage back to functions, objects, and retained variables. This combination allows developers to investigate performance problems from both the symptom level and the underlying cause . What Is GOT Online? GOT Online is GameOptim's cloud based game performance analysis service , designed to help development teams analyze performance data collected from local testing. GOT Online provides multiple specialized analysis modes for investigating different types of performance problems, including: Overall Performance Analysis Mono Heap Memory Analysis Lua Performance Analysis GPU Performance Analysis With the latest improvements to Overview, Lua, and Mono modes, GameOptim continues to improve the workflow for locating performance bottlenecks, analyzing memory behavior, and tracing problems back to specific functions and objects. FAQ Q1: How can I determine whether frequent GC calls are related to memory allocation? Frequent GC calls can indicate that heap allocations are occurring frequently. If GC becomes increasingly frequent as gameplay continues, developers should investigate whether specific functions are allocating heap memory excessively or too often. GOT Online Mono mode can be used for further allocation analysis. Q2: What is reverse analysis in GOT Online Lua mode? Reverse analysis helps trace a selected Lua function back to its parent functions. Instead of manually navigating through a deep call stack, developers can use the reverse relationship to identify the functions that called the selected function and contributed to heap allocation. Q3: How can self time help identify expensive Lua functions? Self time indicates the execution time directly attributed to a function. By viewing the self time percentage in specified frame stack information, developers can more quickly identify functions that consume a significant portion of the measured execution time. Q4: How can I investigate Mono memory leaks with GOT Online? In Mono mode, developers can compare different memory samples and inspect changes in heap memory usage, retained variables, objects, and associated functions. This can help trace memory growth back to specific functions or objects. Q5: Can GOT Online analyze performance by scene? Yes. The updated CPU analysis workflow supports scene based viewing, allowing developers to jump to a specific scene and examine the distribution of function execution time within that scene.