summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJ.C. Jones <jjones@mozilla.com>2019-11-22 18:39:50 +0000
committerJ.C. Jones <jjones@mozilla.com>2019-11-22 18:39:50 +0000
commit92cff7d8a87c05f38f1610a9f5acab1070cfb66a (patch)
treea73da6e8c383844ff856463ecf42855457187563
parent18bcde1f0bbd277b07b816caac7f0c5025acd884 (diff)
downloadnss-hg-92cff7d8a87c05f38f1610a9f5acab1070cfb66a.tar.gz
Bug 1522203 - Remove Pentium Pro workaround for PK11_GetAllTokens r=kjacobs
The comment indicated the wasted effort was to work around a cache issue on the Pentium Pro. I think it has served its purpose. Differential Revision: https://phabricator.services.mozilla.com/D54337
-rw-r--r--lib/pk11wrap/pk11slot.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/lib/pk11wrap/pk11slot.c b/lib/pk11wrap/pk11slot.c
index 072294056..c44ed9b49 100644
--- a/lib/pk11wrap/pk11slot.c
+++ b/lib/pk11wrap/pk11slot.c
@@ -2177,10 +2177,6 @@ PK11_GetAllTokens(CK_MECHANISM_TYPE type, PRBool needRW, PRBool loadCerts,
SECMODModuleList *modules;
SECMODListLock *moduleLock;
int i;
-#if defined(XP_WIN32)
- int j = 0;
- PRInt32 waste[16];
-#endif
moduleLock = SECMOD_GetDefaultModuleListLock();
if (!moduleLock) {
@@ -2205,18 +2201,6 @@ PK11_GetAllTokens(CK_MECHANISM_TYPE type, PRBool needRW, PRBool loadCerts,
modules = SECMOD_GetDefaultModuleList();
for (mlp = modules; mlp != NULL; mlp = mlp->next) {
-
-#if defined(XP_WIN32)
- /* This is works around some horrible cache/page thrashing problems
- ** on Win32. Without this, this loop can take up to 6 seconds at
- ** 100% CPU on a Pentium-Pro 200. The thing this changes is to
- ** increase the size of the stack frame and modify it.
- ** Moving the loop code itself seems to have no effect.
- ** Dunno why this combination makes a difference, but it does.
- */
- waste[j & 0xf] = j++;
-#endif
-
for (i = 0; i < mlp->module->slotCount; i++) {
PK11SlotInfo *slot = mlp->module->slots[i];