Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[vioscsi] Implement cold and hot tracing paths
1. Introduced three (3) compile-time environment variables: RUN_WPP_ALL_PATHS - Compile WPP for the hot path too. Is the inverse of RUN_COLD_PATH_ONLY, which is the default behaviour. FORCE_RUN_UNCHECKED - Run without EVENT_TRACING or DBG. Defines RUN_UNCHECKED. FORCE_RUN_DEBUG - Run with DBG rather than EVENT_TRACING. Undefines EVENT_TRACING. 2. WPP scans for WPP config on a per file basis. Sections of the config file cannot be excluded and conditional macros will be ignored. To solve this, we establish two new files with WPP configuration data. One holds exclusively cold path data (wpp_cold_path.h) and the other holds data for all paths (wpp_all_paths.h). Which file to use is set conditionally per the vioscsi.vcxproj project file configuration. 3. The hot path DBG and WPP macro variants are a clone of the cold path macros, but with a "_HP" suffix. The exception to this is RhelDbgPrint() which we extend as RhelDbgPrintHotPath(). 4. Encapsulated exisitng cold and and hot trace messages in compile-time conditional macros and in same manner drops *.tmh includes when necessary. 5. Minor refactoring of: a) helper.c - GetScsiConfig() b) helper.c - SetGuestFeatures() 6. Major refactoring of: a) trace.h b) vioscsi.c - VioScsiHwInitialize() - corrects order of init for benefit of clean trace. 7. Major new instrumentation of: a) helper.c - InitVirtIODevice() 8. Reconfigured the following for INLINE function tracing: a) vioscsi.c - HandleResponse() b) vioscsi.c - PreProcessRequest() c) vioscsi.c - PostProcessRequest() d) vioscsi.c - DispatchQueue() 9. Mnemonic rename of VioScsiPassiveInitializeRoutine() to VioScsiPassiveDpcInitializeRoutine(). 10. Correct struct virtio_bar for bMemorySpace rather than bPortSpace (vioscsi.h and virtio_pci.c). 11. Add missing structs for PCI Capabilities (vioscsi.h). Hard to split this one up further methinks. I do have a fair bit of additional instrumentation to merge after this one. Signed-off-by: benyamin-codez <[email protected]>
- Loading branch information