-
Sasha Goldshtein authored
These tools now support USDT probes with the 'u:provider:probe' syntax. Probes in a library or process can be listed with 'tplist -l LIB' or 'tplist -p PID'. Probe arguments are also parsed and available in both argdist and trace as arg1, arg2, etc., regardless of the probe attach location. The same USDT probe can be used at multiple locations, which means the attach infra- structure must probe all these locations. argdist and trace register thunk probes at each location, which call a central probe function (which is static inline) with the location id (__loc_id). The central probe function checks the location id to determine how the arguments should be retrieved -- this is location-dependent. Finally, some USDT probes must be enabled first by writing a value to a memory location (this is called a "semaphore"). This value is per-process, so we require a process id for this kind of probes. Along with trace and argdist tool support, this commit also introduces new classes in the bcc module: ProcStat handles pid-wrap detection, whereas USDTReader, USDTProbe, USDTProbeLocation, and USDTArgument are the shared USDT-related infrastructure that enables enumeration, attachment, and argument retrieval for USDT probes.
3e39a08a