8235931: add OM_CACHE_LINE_SIZE and use smaller size on SPARCv9 and X64

Reviewed-by: dholmes, redestad, mdoerr
This commit is contained in:
Daniel D. Daugherty 2020-02-05 11:38:18 -05:00
parent e7e182a318
commit b9e3a4efef
5 changed files with 28 additions and 12 deletions

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 1998, 2019, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 1998, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
@ -34,7 +34,13 @@
class ObjectMonitor;
class ThreadsList;
typedef PaddedEnd<ObjectMonitor, DEFAULT_CACHE_LINE_SIZE> PaddedObjectMonitor;
#ifndef OM_CACHE_LINE_SIZE
// Use DEFAULT_CACHE_LINE_SIZE if not already specified for
// the current build platform.
#define OM_CACHE_LINE_SIZE DEFAULT_CACHE_LINE_SIZE
#endif
typedef PaddedEnd<ObjectMonitor, OM_CACHE_LINE_SIZE> PaddedObjectMonitor;
struct DeflateMonitorCounters {
int n_in_use; // currently associated with objects