From 9e95400e5b368d6005bdbf1374bd7abcbca23b12 Mon Sep 17 00:00:00 2001 From: Robert Watson Date: Fri, 11 Feb 2005 15:17:57 +0000 Subject: [PATCH] Add a bit more caveat text about MUTEX_PROFILING -- try to avoid using it with other profiling and debugging options, such as INVARIANTS, WITNESS, kernel profiling, etc. They all interfere with each other nastily and will generate fairly useless results. --- share/man/man9/MUTEX_PROFILING.9 | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/share/man/man9/MUTEX_PROFILING.9 b/share/man/man9/MUTEX_PROFILING.9 index bbca8ab4ed8..7f8baf255eb 100644 --- a/share/man/man9/MUTEX_PROFILING.9 +++ b/share/man/man9/MUTEX_PROFILING.9 @@ -1,5 +1,6 @@ .\"- .\" Copyright (c) 2004 Dag-Erling Coïdan Smørgrav +.\" Copyright (c) 2005 Robert N. M. Watson .\" All rights reserved. .\" .\" Redistribution and use in source and binary forms, with or without @@ -158,6 +159,12 @@ option also prevents inlining of the mutex code, which results in a fairly severe performance penalty. It should therefore only be enabled on systems where mutex profiling is actually needed. +.Dv MUTEX_PROFILING +will introduce a substantial performance overhead that is easily +monitorable using other profiling tools, so combining profiling tools +with +.Dv MUTEX_PROFILING +is not recommended. .Pp Measurements are made and stored in nanoseconds using .Xr nanotime 9 , @@ -165,3 +172,19 @@ but are presented in microseconds. This should still be sufficient for the locks one would be most interested in profiling (those that are held long and/or acquired often). +.Pp +.Dv MUTEX_PROFILING +should generally not be used in combination with other debugging options, as +the results may be strongly affected by interactions between the features. +In particular, +.Dv MUTEX_PROFILING +will report higher than normal +.Xr uma 9 +lock contention when run with +.Dv INVARIANTS +due to extra locking that occurs when +.Dv INVARIANTS +is present; likewise, using it in combination with +.Dv WITNESS +with +will lead to much higher lock hold times and contention in profiling output.