Changeset 175804 in webkit


Ignore:
Timestamp:
Nov 10, 2014 2:38:09 AM (9 years ago)
Author:
commit-queue@webkit.org
Message:

Enable Cortex-A53-specific code paths by default if core is detected.
https://bugs.webkit.org/show_bug.cgi?id=138499

Patch by Akos Kiss <akiss@inf.u-szeged.hu> on 2014-11-10
Reviewed by Csaba Osztrogonác.

On ARM64/Linux, check /proc/cpuinfo for CPU part 0xd03 (signaling
Cortex-A53) and set the initial value of WTF_CPU_ARM64_CORTEXA53 to true
if found.

Since on ARM64/Linux the part number that cpuinfo reports depends on
the core the query is run on, the check is bound to and executed on the
available cores one by one.

  • Source/cmake/OptionsCommon.cmake:
Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ChangeLog

    r175803 r175804  
     12014-11-10  Akos Kiss  <akiss@inf.u-szeged.hu>
     2
     3        Enable Cortex-A53-specific code paths by default if core is detected.
     4        https://bugs.webkit.org/show_bug.cgi?id=138499
     5
     6        Reviewed by Csaba Osztrogonác.
     7
     8        On ARM64/Linux, check /proc/cpuinfo for CPU part 0xd03 (signaling
     9        Cortex-A53) and set the initial value of WTF_CPU_ARM64_CORTEXA53 to true
     10        if found.
     11
     12        Since on ARM64/Linux the part number that cpuinfo reports depends on
     13        the core the query is run on, the check is bound to and executed on the
     14        available cores one by one.
     15
     16        * Source/cmake/OptionsCommon.cmake:
     17
    1182014-11-10  Eva Balazsfalvi  <evab.u-szeged@partner.samsung.com>
    219
  • trunk/Source/cmake/OptionsCommon.cmake

    r175514 r175804  
    3030    set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -std=c++11")
    3131endif ()
     32
     33# Detect Cortex-A53 core if CPU is ARM64 and OS is Linux.
     34# Query /proc/cpuinfo for each available core and check reported CPU part number: 0xd03 signals Cortex-A53.
     35# (see Main ID Register in ARM Cortex-A53 MPCore Processor Technical Reference Manual)
     36set(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE OFF)
     37if (WTF_CPU_ARM64 AND (${CMAKE_SYSTEM_NAME} STREQUAL "Linux"))
     38    execute_process(COMMAND nproc OUTPUT_VARIABLE PROC_COUNT)
     39    math(EXPR PROC_MAX ${PROC_COUNT}-1)
     40    foreach (PROC_ID RANGE ${PROC_MAX})
     41        execute_process(COMMAND taskset -c ${PROC_ID} grep "^CPU part" /proc/cpuinfo OUTPUT_VARIABLE PROC_PART)
     42        if (PROC_PART MATCHES "0xd03")
     43            set(WTF_CPU_ARM64_CORTEXA53_INITIALVALUE ON)
     44            break ()
     45        endif ()
     46    endforeach ()
     47endif ()
     48option(WTF_CPU_ARM64_CORTEXA53 "Enable Cortex-A53-specific code paths" ${WTF_CPU_ARM64_CORTEXA53_INITIALVALUE})
    3249
    3350if (WTF_CPU_ARM64_CORTEXA53)
Note: See TracChangeset for help on using the changeset viewer.