koolhazz / gperftools

Automatically exported from code.google.com/p/gperftools
BSD 3-Clause "New" or "Revised" License
0 stars 0 forks source link

Porting gperftools for MIPS32 and MIPS64 #564

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1.These are the patches for gperftools 2.0, 2.0.99 and 2.1.
2.gperftools-2.0_mips.patch is the patch for gperftools 2.0
3.gperftools-2.1_mips.patch is the patch for both gperftools 2.0.99 and 
gperftools 2.1
4.cd google-perftools-2.0/ && patch -p1 < ../google-perftools-2.0_mips.patch
5.cd google-perftools-2.1/ && patch -p1 < ../google-perftools-2.1_mips.patch
6.After that standard cross compilation procedure ./configure, make && make 
install

What is the expected output? What do you see instead?
File with atomicops for MIPS32 and MIPS64 is added,
stacktrace for MIPS use stacktrace_generic-inl.h.
All the tests are passing except for the tests that rely on stacktrace test
(no stacktrace support for MIPS architecture).

What version of the product are you using? On what operating system?
gperftools 2.0, 2.0.99 and 2.1 version were used.
These patches are tested on:
EP6300C (Cavium Octeon II),         Linux kernel 3.4.27, MIPS64
Netlogic XLP (XLP316 Rev A0),       Linux kernel 3.0.26, MIPS64
Sigma Designs TangoX (MIPS 1004Kc), Linux kernel 3.0.4,  MIPS32
MIPS Malta (MIPS 74Kc),             Linux kernel 3.6.0,  MIPS32

Please provide any additional information below.
MIPS32:
CFLAGS="-mips32r2 -O2" CFLAGS="-mips32r2 -O2" ./configure --host=(mips 
cross-compiler without -gcc)
make && make install
MIPS64:
CFLAGS="-mips64r2 -O2" CFLAGS="-mips64r2 -O2" ./configure --host=(mips 
cross-compiler without -gcc)
make && make install

Original issue reported on code.google.com by jovanzelincevic@gmail.com on 15 Aug 2013 at 2:28

Attachments:

GoogleCodeExporter commented 9 years ago
Thank for patch.

My only concern is that in your patch barrier is only compiler barrier. In 
previous patch (issue 361) I'm seeing some sync instruction apparently used for 
barrier. I'm not familiar with mips ISA unfortunately.

Original comment by alkondratenko on 18 Aug 2013 at 1:20

GoogleCodeExporter commented 9 years ago
You're welcome.

Yes, you're right. I change patches to use hardware memory barrier instead of 
compiler barrier.

Original comment by jovanzelincevic@gmail.com on 19 Aug 2013 at 11:44

Attachments:

GoogleCodeExporter commented 9 years ago
To jovanzelincevic@gmail.com, I find libunwind works fine for mips. I suggest 
stacktrace for MIPS use stacktrace_libunwind-inl.h than 
stacktrace_generic-inl.h.

Original comment by xiaoyur...@gmail.com on 24 Aug 2013 at 10:05

GoogleCodeExporter commented 9 years ago
Thanks xiaoyur...@gmail.com,
I change patches to support libunwind.
I also added this line like you said in mail.
pc_fields="$pc_fields uc_mcontext.pc"

Original comment by jovanzelincevic@gmail.com on 6 Sep 2013 at 1:41

Attachments:

GoogleCodeExporter commented 9 years ago
merged. Thanks a lot.

Original comment by alkondratenko on 9 Sep 2013 at 3:14