]> git.ipfire.org Git - thirdparty/open-vm-tools.git/commitdiff
Common header file change not directly applicable to open-vm-tools.
authorJohn Wolfe <jwolfe@vmware.com>
Tue, 7 Sep 2021 13:39:53 +0000 (06:39 -0700)
committerJohn Wolfe <jwolfe@vmware.com>
Tue, 7 Sep 2021 13:39:53 +0000 (06:39 -0700)
open-vm-tools/lib/include/vm_valgrind.h

index 5aae0c40905181f8c197bdf4189c3203d3c03785..076011b58a8e7feb607f8d189390c24a4ba2b3c3 100644 (file)
@@ -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
 
 #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_ */