[SERVER-22268] Enable gperftools on Linux s390x Created: 21/Jan/16  Updated: 26/Apr/16  Resolved: 14/Apr/16

Status: Closed
Project: Core Server
Component/s: Portability
Affects Version/s: None
Fix Version/s: 3.3.5

Type: Improvement Priority: Major - P3
Reporter: Bryan Chan Assignee: Mark Benvenuto
Resolution: Done Votes: 0
Labels: None
Remaining Estimate: Not Specified
Time Spent: Not Specified
Original Estimate: Not Specified

Issue Links:
Depends
depends on SERVER-17788 Upgrade to gperftools 2.5 Closed
Backwards Compatibility: Fully Compatible
Sprint: Platforms 13 (04/22/16)
Participants:

 Description   

gperftools-2.2 can be built (at least the tcmalloc portion) on Linux s390x. These changes are not in upstream gperftools yet.

1. gperftools does not have a stack unwinder for s390x. Add HAVE_DECL_BACKTRACE to CPPDEFINES.

2. Define CACHELINE_ALIGNED in src/base/basictypes.h.

3. Implement a cycle clock in src/base/cycleclock.h.

4. Adapt src/base/linux_syscall_support.h for s390x.

5. Fix a memcmp bug in src/base/sysinfo.cc, around line 124. This code assumes that both *p and name are at least namelen long, which is not always true.

6. Implement do_mmap64 for s390x in src/malloc_hook_mmap_linux.h.

With the above changes, MongoDB can be built without the --allocator=system option.



 Comments   
Comment by Andrew Morrow (Inactive) [ 21/Jan/16 ]

Please note that we are hoping to upgrade gperftools to 2.4 (or 2.6 if they release that soon). Have the above changes been applied in the upstream gperftools 2.4 or master branches? If not, I'd encourage you to get them merged into gperftools master.

Generated at Thu Feb 08 03:59:53 UTC 2024 using Jira 9.7.1#970001-sha1:2222b88b221c4928ef0de3161136cc90c8356a66.