Navigation Menu

Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PATCH] This patch adds support for CACHELINE_ALIGNED value for arm devices #485

Closed
alk opened this issue Aug 23, 2015 · 2 comments
Closed

Comments

@alk
Copy link
Contributor

alk commented Aug 23, 2015

Originally reported on Google Code with ID 482

 This patch adds support for CACHELINE_ALIGNED value for arm
 devices. I hardcode the cacheline size to 32 because this
 value is supported by several arm devices, however a better
 logic needs to be implemented to handle more arm devices.

---
 src/base/basictypes.h |    2 ++
 1 file changed, 2 insertions(+)

diff --git a/src/base/basictypes.h b/src/base/basictypes.h
index baaa806..db12a26 100644
--- a/src/base/basictypes.h
+++ b/src/base/basictypes.h
@@ -334,6 +334,8 @@ class AssignAttributeStartEnd {
 #if defined(HAVE___ATTRIBUTE__)
 # if (defined(__i386__) || defined(__x86_64__))
 #   define CACHELINE_ALIGNED __attribute__((aligned(64)))
+# elif defined(__arm__)
+#   define CACHELINE_ALIGNED __attribute__((aligned(32)))
 # elif (defined(__PPC__) || defined(__PPC64__))
 #   define CACHELINE_ALIGNED __attribute__((aligned(16)))
 # endif
-- 

Reported by itrindade.oliveira on 2012-11-13 00:31:29

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

Reported by chappedm on 2012-12-22 17:46:43

  • Status changed: Accepted

@alk
Copy link
Contributor Author

alk commented Aug 23, 2015

r184 | chappedm@gmail.com | 2012-12-22 13:34:43 -0500 (Sat, 22 Dec 2012) | 7 lines

issue-488: Performance improvement for initialization checks

These came in from the Google-internal version of tcmalloc. They saw some
decent speed improvements, both on microbenchmarks and big programs. The
idea is to improve the speed of the "Is everything initialized?" type of
code, that's at the start of all allocations and deallocations.

Reported by chappedm on 2012-12-22 18:42:45

  • Status changed: Fixed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant