From: John Wolfe Date: Tue, 7 Sep 2021 13:39:53 +0000 (-0700) Subject: Common header file change not directly applicable to open-vm-tools. X-Git-Tag: stable-12.0.0~113 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ee2fe611e1c6f27d0e918a361a967f13da10ba08;p=thirdparty%2Fopen-vm-tools.git Common header file change not directly applicable to open-vm-tools. --- diff --git a/open-vm-tools/lib/include/vm_valgrind.h b/open-vm-tools/lib/include/vm_valgrind.h index 5aae0c409..076011b58 100644 --- a/open-vm-tools/lib/include/vm_valgrind.h +++ b/open-vm-tools/lib/include/vm_valgrind.h @@ -1,5 +1,5 @@ /********************************************************* - * Copyright (C) 2014 VMware, Inc. All rights reserved. + * Copyright (C) 2014, 2021 VMware, Inc. All rights reserved. * * This program is free software; you can redistribute it and/or modify it * under the terms of the GNU Lesser General Public License as published @@ -63,4 +63,15 @@ #endif +/* + * VALGRIND_SPEED_FACTOR is an approximation of how much Valgrind's + * instrumentation is likely to slow down execution. It is a _very_ rough + * guess because the actual slowdown will depend on the nature of the code + * being executed, but regardless this is a handy macro for adjusting (by + * multiplying or dividing) times or loop counts or anything else impacted by + * Valgrind's instrumentation overhead. + */ + +#define VALGRIND_SPEED_FACTOR (RUNNING_ON_VALGRIND ? 100 : 1) + #endif /* _VM_VALGRIND_H_ */