diff options
| author | 2024-05-30 03:55:57 +0000 | |
|---|---|---|
| committer | 2024-05-30 18:44:03 +0000 | |
| commit | dfbed425ac533a70400c087dedc599e878da83ea (patch) | |
| tree | 6f35bcfaa26ba36d596577218819706b1a09d679 /compiler/optimizing/optimizing_compiler_stats.h | |
| parent | 90b1468e47fa8565683c1e6fafd4db8f9ce5107f (diff) | |
Fix the way we detect the GC type from the command line.
The previous code was looking for either the "-Xgc:CMC" or "-Xgc:CC" strings, but this is not always the case. For example, if the command line is "-Xgc:CMC ... -Xgc:CC", the code would incorrectly detect the GC type as CMC, even though the last flag is CC and the last flag takes priority.
The new code uses the rfind() function to find the last occurrence of "-Xgc:" in the command line, and then uses substr() to get the substring that follows it. This substring will be either "CMC" or "CC", depending on the GC type.
Merged-In: Id103619fdad5355a5206b95721be0013773bd4f5
Change-Id: Id103619fdad5355a5206b95721be0013773bd4f5
Diffstat (limited to 'compiler/optimizing/optimizing_compiler_stats.h')
0 files changed, 0 insertions, 0 deletions