llvm-project
070a4ae2 - Add symbol locator time for each module in statistics (#134563)

Commit
274 days ago
Add symbol locator time for each module in statistics (#134563) In statistics, add locate time for each module in statistics, we time the PluginManager::LocateExecutableSymbolFile and PluginManager::LocateExecutableObjectFile call, save the duration for the succeeded symbol locator plugin in the Module class as a map. New key being added: Module level: "_symbolLocatorTime_" Summary level: "_totalSymbolLocatorTime_" which would be a map of symbol_locator_plugin_name to time. Sample statistic dump output after this change: ``` Command: statistics dump ===============Output=============== { "commands": { "command container add": 1, "command script add": 51, "command script import": 59, "statistics dump": 1, "target create": 1, "type summary add": 36, "type synthetic add": 21 }, "memory": { "strings": { "bytesTotal": 2801664, "bytesUnused": 1704256, "bytesUsed": 1097408 } }, "modules": [ { "debugInfoByteSize": 244927, "debugInfoEnabled": true, "debugInfoHadIncompleteTypes": false, "debugInfoHadVariableErrors": false, "debugInfoIndexLoadedFromCache": false, "debugInfoIndexSavedToCache": false, "debugInfoIndexTime": 0.61934599999999995, "debugInfoParseTime": 0.00033100000000000002, "identifier": 94868115726768, "path": "/home/hyubo/.cache/llvm-debuginfod/client/llvmcache-720c9a0f5ba8b460a1524a25597226f0fa551f71-c4crasher", "symbolLocatorTime": { "debuginfod": 1.4547020000000002 }, "symbolTableIndexTime": 0.0035370000000000002, "symbolTableLoadedFromCache": false, "symbolTableParseTime": 0.0055040000000000002, "symbolTableSavedToCache": false, "symbolTableStripped": false, "triple": "x86_64--linux", "uuid": "720C9A0F-5BA8-B460-A152-4A25597226F0-FA551F71" }, { "debugInfoByteSize": 0, "debugInfoEnabled": false, "debugInfoHadIncompleteTypes": false, "debugInfoHadVariableErrors": false, "debugInfoIndexLoadedFromCache": false, "debugInfoIndexSavedToCache": false, "debugInfoIndexTime": 0, "debugInfoParseTime": 0, "identifier": 94868111142256, "path": "[vdso](0x00007ffd41c59000)", "symbolLocatorTime": { "debuginfod": 0.80597700000000005 }, "symbolTableIndexTime": 2.8e-05, "symbolTableLoadedFromCache": false, "symbolTableParseTime": 0.00037300000000000001, "symbolTableSavedToCache": false, "symbolTableStripped": false, "triple": "x86_64--linux", "uuid": "4D1F38BD-BD34-DFB3-C9A5-B49A2A912219-AC713763" }, { "debugInfoByteSize": 0, "debugInfoEnabled": false, "debugInfoHadIncompleteTypes": false, "debugInfoHadVariableErrors": false, "debugInfoIndexLoadedFromCache": false, "debugInfoIndexSavedToCache": false, "debugInfoIndexTime": 0, "debugInfoParseTime": 0, "identifier": 94868116162096, "path": "/usr/local/fbcode/platform010/lib/libc.so.6", "symbolLocatorTime": { "debuginfod": 0.286356 }, "symbolTableIndexTime": 0.0091780000000000004, "symbolTableLoadedFromCache": false, "symbolTableParseTime": 0.081841999999999998, "symbolTableSavedToCache": false, "symbolTableStripped": false, "triple": "x86_64--linux", "uuid": "ACE9DF01-8872-3A35-6D14-3C92527EF739-4BE32C75" }, { "debugInfoByteSize": 0, "debugInfoEnabled": false, "debugInfoHadIncompleteTypes": false, "debugInfoHadVariableErrors": false, "debugInfoIndexLoadedFromCache": false, "debugInfoIndexSavedToCache": false, "debugInfoIndexTime": 0, "debugInfoParseTime": 0, "identifier": 94868111990032, "path": "/usr/local/fbcode/platform010/lib/libm.so.6", "symbolLocatorTime": { "debuginfod": 0.63356699999999999 }, "symbolTableIndexTime": 0.0023960000000000001, "symbolTableLoadedFromCache": false, "symbolTableParseTime": 0.021706, "symbolTableSavedToCache": false, "symbolTableStripped": false, "triple": "x86_64--linux", "uuid": "85932B54-0DE7-4FC1-23B0-FB09AD1A5A61-8E1098B7" }, { "debugInfoByteSize": 0, "debugInfoEnabled": false, "debugInfoHadIncompleteTypes": false, "debugInfoHadVariableErrors": false, "debugInfoIndexLoadedFromCache": false, "debugInfoIndexSavedToCache": false, "debugInfoIndexTime": 0, "debugInfoParseTime": 0, "identifier": 94868116399488, "path": "/usr/local/fbcode/platform010/lib/libmvec.so.1", "symbolLocatorTime": { "debuginfod": 0.66705099999999995 }, "symbolTableIndexTime": 0.00053700000000000004, "symbolTableLoadedFromCache": false, "symbolTableParseTime": 0.0034429999999999999, "symbolTableSavedToCache": false, "symbolTableStripped": false, "triple": "x86_64--linux", "uuid": "4537CA22-8E6E-495B-7A03-FC2CEDCAD71C-8A7B2067" }, { "debugInfoByteSize": 0, "debugInfoEnabled": false, "debugInfoHadIncompleteTypes": false, "debugInfoHadVariableErrors": false, "debugInfoIndexLoadedFromCache": false, "debugInfoIndexSavedToCache": false, "debugInfoIndexTime": 0, "debugInfoParseTime": 0, "identifier": 94868111778368, "path": "/usr/local/fbcode/platform010/lib/libatomic.so.1", "symbolLocatorTime": { "debuginfod": 0.83268299999999995 }, "symbolTableIndexTime": 0.000243, "symbolTableLoadedFromCache": false, "symbolTableParseTime": 0.0026640000000000001, "symbolTableSavedToCache": false, "symbolTableStripped": false, "triple": "x86_64--", "uuid": "F90F9111-BBD1-C2A9-972A-34EB75ABE62E-3BDED9CF" }, { "debugInfoByteSize": 0, "debugInfoEnabled": false, "debugInfoHadIncompleteTypes": false, "debugInfoHadVariableErrors": false, "debugInfoIndexLoadedFromCache": false, "debugInfoIndexSavedToCache": false, "debugInfoIndexTime": 0, "debugInfoParseTime": 0, "identifier": 94868116403264, "path": "/usr/local/fbcode/platform010/lib/libgcc_s.so.1", "symbolLocatorTime": { "debuginfod": 0.58871499999999999 }, "symbolTableIndexTime": 0.000292, "symbolTableLoadedFromCache": false, "symbolTableParseTime": 0.0033, "symbolTableSavedToCache": false, "symbolTableStripped": false, "triple": "x86_64--", "uuid": "1C715A92-40BE-BE95-E148-1B401749BAB8-15D09F9D" }, { "debugInfoByteSize": 0, "debugInfoEnabled": false, "debugInfoHadIncompleteTypes": false, "debugInfoHadVariableErrors": false, "debugInfoIndexLoadedFromCache": false, "debugInfoIndexSavedToCache": false, "debugInfoIndexTime": 0, "debugInfoParseTime": 0, "identifier": 94868113225328, "path": "/usr/local/fbcode/platform010/lib/libstdc++.so.6", "symbolLocatorTime": { "debuginfod": 0.76993400000000001 }, "symbolTableIndexTime": 0.042455, "symbolTableLoadedFromCache": false, "symbolTableParseTime": 0.081374000000000002, "symbolTableSavedToCache": false, "symbolTableStripped": false, "triple": "x86_64--", "uuid": "C9DAEE53-F607-981B-6BED-F2042833BFC7-71A1E66C" }, { "debugInfoByteSize": 0, "debugInfoEnabled": false, "debugInfoHadIncompleteTypes": false, "debugInfoHadVariableErrors": false, "debugInfoIndexLoadedFromCache": false, "debugInfoIndexSavedToCache": false, "debugInfoIndexTime": 0, "debugInfoParseTime": 0, "identifier": 94868113600960, "path": "/usr/local/fbcode/platform010/lib/ld.so", "symbolLocatorTime": { "debuginfod": 0.48382199999999997 }, "symbolTableIndexTime": 0.00054799999999999998, "symbolTableLoadedFromCache": false, "symbolTableParseTime": 0.0057219999999999997, "symbolTableSavedToCache": false, "symbolTableStripped": false, "triple": "x86_64--linux", "uuid": "CCA86CF4-E4FF-42C8-7056-2F7D8B83AEE0-530B4095" } ], "targets": [ { "breakpoints": [], "dyldPluginName": "dump-modulelist-dyld", "expressionEvaluation": { "failures": 0, "successes": 0 }, "frameVariable": { "failures": 0, "successes": 0 }, "mismatchCoredumpModuleCount": 0, "moduleIdentifiers": [ 94868115726768, 94868111142256, 94868116162096, 94868111990032, 94868116399488, 94868111778368, 94868116403264, 94868113225328, 94868113600960 ], "signals": [ { "SIGABRT": 1 } ], "sourceMapDeduceCount": 0, "sourceRealpathAttemptCount": 0, "sourceRealpathCompatibleCount": 0, "stopCount": 1, "summaryProviderStatistics": [], "targetCreateTime": 4.1999999999999998e-05, "totalBreakpointResolveTime": 0, "totalSharedLibraryEventHitCount": 0 } ], "totalDebugInfoByteSize": 244927, "totalDebugInfoEnabled": 1, "totalDebugInfoIndexLoadedFromCache": 0, "totalDebugInfoIndexSavedToCache": 0, "totalDebugInfoIndexTime": 0.61934599999999995, "totalDebugInfoParseTime": 0.00033100000000000002, "totalModuleCount": 9, "totalModuleCountHasDebugInfo": 1, "totalModuleCountWithIncompleteTypes": 0, "totalModuleCountWithVariableErrors": 0, "totalSymbolLocatorTime": { "debuginfod": 6.5228070000000002 }, "totalSymbolTableIndexTime": 0.059214000000000003, "totalSymbolTableParseTime": 0.205928, "totalSymbolTableStripped": 0, "totalSymbolTablesLoadedFromCache": 0, "totalSymbolTablesSavedToCache": 0, "transcript": [ { "command": "symsrv", "commandArguments": "", "commandName": "symsrv", "durationInSeconds": 0.00069099999999999999, "error": "", "output": "", "timestampInEpochSeconds": 1744934015 }, { "command": "settings set symbols.enable-external-lookup true", "commandArguments": "symbols.enable-external-lookup true", "commandName": "settings set", "durationInSeconds": 4.1999999999999998e-05, "error": "", "output": "", "timestampInEpochSeconds": 1744934015 }, { "command": "settings insert-before plugin.symbol-locator.debuginfod.server-urls 0 https://our.intern.facebook.com/intern/debuginfod", "commandArguments": "plugin.symbol-locator.debuginfod.server-urls 0 https://our.intern.facebook.com/intern/debuginfod", "commandName": "settings insert-before", "durationInSeconds": 5.5999999999999999e-05, "error": "", "output": "", "timestampInEpochSeconds": 1744934015 }, { "command": "target create --core \"/var/tmp/cores/c4crasher.crasher.1576894\"", "commandArguments": "--core \"/var/tmp/cores/c4crasher.crasher.1576894\"", "commandName": "target create", "durationInSeconds": 6.7297630000000002, "error": "", "output": "Core file '/var/tmp/cores/c4crasher.crasher.1576894' (x86_64) was loaded.\n", "timestampInEpochSeconds": 1744934017 }, { "command": "fbpaste statistics dump", "commandArguments": "statistics dump", "commandName": "fbpaste", "timestampInEpochSeconds": 1744934055 }, { "command": "statistics dump", "commandArguments": "", "commandName": "statistics dump", "timestampInEpochSeconds": 1744934055 } ] } ``` Co-authored-by: George Hu <georgehuyubo@gmail.com>
Author
Parents
Loading