Description
Contains the instrumentation points using LLVM’s XRay feature.
Columns
id(UInt32) — ID of the instrumentation pointfunction_id(Int32) — ID assigned to the function in xray_instr_map section of elf-binary.function_name(LowCardinality(String)) — Name used to instrument the function.handler(LowCardinality(String)) — Handler that was patched into instrumentation points of the function.entry_type(Enum8(‘Entry’ = 0, ‘Exit’ = 1, ‘EntryAndExit’ = 2)) — Entry type for the patch.symbol(LowCardinality(String)) — Complete and demangled symbol name.arguments(Array(Dynamic)) — Arguments for the handler call.
Example
SELECT * FROM system.instrumentation FORMAT Vertical;Row 1:
──────
id: 0
function_id: 231280
function_name: QueryMetricLog::startQuery
handler: log
entry_type: Entry
symbol: DB::QueryMetricLog::startQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000l>>>, unsigned long)
arguments: ['test']
Row 2:
──────
id: 1
function_id: 231280
function_name: QueryMetricLog::startQuery
handler: profile
entry_type: EntryAndExit
symbol: DB::QueryMetricLog::startQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000l>>>, unsigned long)
arguments: []
Row 3:
──────
id: 2
function_id: 231280
function_name: QueryMetricLog::startQuery
handler: sleep
entry_type: Exit
symbol: DB::QueryMetricLog::startQuery(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char>> const&, std::__1::chrono::time_point<std::__1::chrono::system_clock, std::__1::chrono::duration<long long, std::__1::ratio<1l, 1000000l>>>, unsigned long)
arguments: [0.3]
3 rows in set. Elapsed: 0.302 sec.See Also
- SYSTEM INSTRUMENT — Add or remove instrumentation points.
- system.trace_log — Inspect profiling log.
- system.symbols — Inspect symbols to add instrumentation points.