`AllocationSite` contains a call stack and a MEMFLAGS object. `AllocationSite::equals()` only compares the call stack, disregarding the MEMFLAGS setting.
In theory two objects with the same call stack should always have the same MEMFLAGS value too since the call stack should refer to the same allocation call site. However, the call stack grabbing may have been off, we may have skipped or lost too many low frames.
(We see this actually happening on some platforms, see [1])
The effect could be that multiple allocation sites get lumped together and registered with the same call stack. But they may carry different flags.
The flag values are currently compared outside of `AllocationSite::equals()` in `MallocSiteTable::lookup_and_add()`. But `AllocationSite`objects are placed into sorting containers too and therefore `AllocationSite::equals()` should do the comparison.
[1] https://bugs.openjdk.java.net/browse/JDK-8261556