New issue
Advanced search Search tips

Issue 799810 link

Starred by 2 users

Issue metadata

Status: Unconfirmed
Owner: ----
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

TcMalloc can‘t support 64-bits LittleEndian targets(mips64el)to compile

Reported by wangqing...@loongson.cn, Jan 8 2018

Issue description

UserAgent: Mozilla/5.0 (X11; Linux mips64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3096.2 Safari/537.36

Steps to reproduce the problem:
update chromium latest version from https://chromium.googlesource.com/chromium/src.git,and compiled with _default_allocator=tcmalloc on loongson3a platform,but occurs following errors:
FAILED: g++ -MMD -MF obj/base/allocator/tcmalloc/internal_logging.o.d -DNO_HEAP_CHECK -DV8_DEPRECATION_WARNINGS -DUSE_UDEV -DUSE_AURA=1 -DUSE_PANGO=1 -DUSE_CAIRO=1 -DUSE_GLIB=1 -DUSE_NSS_CERTS=1 -DUSE_X11=1 -DDISABLE_NACL -DFULL_SAFE_BROWSING -DSAFE_BROWSING_CSD -DSAFE_BROWSING_DB_LOCAL -DCHROMIUM_BUILD -D_FILE_OFFSET_BITS=64 -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -DNDEBUG -DNVALGRIND -DDYNAMIC_ANNOTATIONS_ENABLED=0 -DTCMALLOC_DONT_REPLACE_SYSTEM_ALLOC -I../../base/allocator -I../../third_party/tcmalloc/chromium/src/base -I../../third_party/tcmalloc/chromium/src -I../.. -Igen -fno-strict-aliasing --param=ssp-buffer-size=4 -fstack-protector -Wno-builtin-macro-redefined -D__DATE__= -D__TIME__= -D__TIMESTAMP__= -funwind-tables -fPIC -pipe -march=loongson3a -Wa,-march=loongson3a -pthread -fomit-frame-pointer -g0 -fvisibility=hidden -Wno-unused-local-typedefs -Wno-maybe-uninitialized -Wno-missing-field-initializers -Wno-unused-parameter -Wno-sign-compare -Wno-unused-result -O2 -fno-ident -fdata-sections -ffunction-sections -std=gnu++11 -fno-rtti -fno-exceptions -fvisibility-inlines-hidden -fpermissive -Wno-deprecated -Wno-narrowing -c ../../third_party/tcmalloc/chromium/src/internal_logging.cc -o obj/base/allocator/tcmalloc/internal_logging.o
In file included from ../../third_party/tcmalloc/chromium/src/base/atomicops.h:109:0,
                 from ../../third_party/tcmalloc/chromium/src/base/spinlock.h:47,
                 from ../../third_party/tcmalloc/chromium/src/internal_logging.cc:46:
../../third_party/tcmalloc/chromium/src/base/atomicops-internals-x86.h: 在函数‘void tcmalloc::Log(tcmalloc::LogMode, const char*, int, tcmalloc::LogItem, tcmalloc::LogItem, tcmalloc::LogItem, tcmalloc::LogItem)’中:
../../third_party/tcmalloc/chromium/src/base/atomicops-internals-x86.h:79:35: 错误:‘asm’中不可能的约束
                        : "memory");
                                   ^
{standard input}: Assembler messages:
{standard input}:494: Error: unrecognized opcode `lfence'

What is the expected behavior?
build successfully on loongson3a, and test passed all.

What went wrong?
Not support mipsel/mips64el architecture

Did this work before? N/A 

Does this work in other browsers? N/A

Chrome version: 60.0.3096.2  Channel: n/a
OS Version: 
Flash Version:
 
Initial patch that Add support for using tcmalloc on loongson platform has just been submitted for a review.

It can be viewed at:
https://chromium-review.googlesource.com/c/chromium/src/+/853695
Components: Internals>Core
Project Member

Comment 3 by bugdroid1@chromium.org, Jan 31 2018

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/0ea5e72aa7746768f0bda56ebed822ec948dccf2

commit 0ea5e72aa7746768f0bda56ebed822ec948dccf2
Author: Wang Qing <wangqing-hf@loongson.cn>
Date: Wed Jan 31 03:52:47 2018

[MIPS64] Add support for using tcmalloc on loongson platform.

Currently, tcmalloc is not supported on loongson, and the build
failed with use tcmalloc. This CL adds support for tcmalloc on
loongson, and resolves many compiler errors, bugs when test
base_unittests on loongosn.

Bug: 799810

R= wfh@chromium.org, thakis@chromium.org

Change-Id: I68bea09334cb9af02d083a24a94654aaf6c884c8
Reviewed-on: https://chromium-review.googlesource.com/853695
Reviewed-by: Will Harris <wfh@chromium.org>
Commit-Queue: 汪 清 <wangqing-hf@loongson.cn>
Cr-Commit-Position: refs/heads/master@{#533192}
[modify] https://crrev.com/0ea5e72aa7746768f0bda56ebed822ec948dccf2/base/allocator/BUILD.gn
[modify] https://crrev.com/0ea5e72aa7746768f0bda56ebed822ec948dccf2/third_party/tcmalloc/README.chromium
[add] https://crrev.com/0ea5e72aa7746768f0bda56ebed822ec948dccf2/third_party/tcmalloc/chromium/src/base/atomicops-internals-mips.h
[modify] https://crrev.com/0ea5e72aa7746768f0bda56ebed822ec948dccf2/third_party/tcmalloc/chromium/src/base/atomicops.h
[modify] https://crrev.com/0ea5e72aa7746768f0bda56ebed822ec948dccf2/third_party/tcmalloc/chromium/src/common.h
[modify] https://crrev.com/0ea5e72aa7746768f0bda56ebed822ec948dccf2/third_party/tcmalloc/chromium/src/stacktrace_config.h
[add] https://crrev.com/0ea5e72aa7746768f0bda56ebed822ec948dccf2/third_party/tcmalloc/chromium/src/stacktrace_mips-inl.h

Sign in to add a comment