SlideShare ist ein Scribd-Unternehmen logo
1 von 16
Downloaden Sie, um offline zu lesen
ASIA 2013 (LCA13)
Optimisation and Assembly
Steve McIntyre <steve.mcintyre@linaro.org>
ASIA 2013 (LCA13)
www.linaro.org
Summary – scanning for assembly
Final total: 1435 packages analysed
Package lists from Ubuntu and Fedora
Tedious work!
Takes a long time to scan thoroughly
ASIA 2013 (LCA13)
www.linaro.org
Analysis
Looking for:
Assembly source files
Files containing inline assembly
Not looking for
Use of intrinsics for SIMD work
Maybe worth revisiting in future
ASIA 2013 (LCA13)
www.linaro.org
Methods
Two lists of packages provided
Ubuntu list from Kiko and Matthias Klose
Fedora list from Al Stone and Jon Masters
Two different scan method to generate these lists
One person (me!) reading the source
Unpack
Look for all likely-looking source files (*.[sS] *.asm *.ASM etc.)
Look for inline assembly in other source files
See how (and if!) the assembly code is actually used
ASIA 2013 (LCA13)
www.linaro.org
Categories
Broad classification of results for each package:
Atomics (10.0%)
Embedded library code (18.1%)
False positives (11.1%)
Lowlevel (38.1%)
OtherOS (9.3%)
Performance (30.4%)
Symbols/sections etc. (2.9%)
Ignorable packages too...
architecture-specific packages
ASIA 2013 (LCA13)
www.linaro.org
Common findings
Lots and lots (and lots) of assembly for
Trivial byteswap code
Hardware identification (CPUID)
Timer access (RDTSC)
SIMD (MMX/SSE/Altivec/NEON) – media libs
Trivial atomics
FPU control
ASIA 2013 (LCA13)
www.linaro.org
Far too many embedded libraries
gnulib
gettext (well, not really)
gc
sqlite
zlib
libjpeg
...
ASIA 2013 (LCA13)
www.linaro.org
Patterns
The Good
Many packages are using gcc intrinsics
Some newer versions of software moving away from inline asm
The Bad
Lots of cargo-culted asm
Far too many embedded libraries
especially in larger projects like browsers
The Ugly^WComical
Compiler workarounds from 1990s
VAX(!) assembly in 10 packages
Asm in place, but not actually enabled/used
ASIA 2013 (LCA13)
www.linaro.org
Priorities for porting work
Arbitrarily assigned priorities thus far...
What's considered important for LEG – server workloads
Dependencies
Looking at Ubuntu-recommended server packages as a guide
Boost priorities for webserver workloads for now
Low priority for some types of package
Desktop apps
Multimedia libs
Games
ASIA 2013 (LCA13)
www.linaro.org
Top 20? It's not that easy!
Lots of toolchain and core libs are already done or in hand
gcc
(e)glibc
klibc
libffi
binutils
gdb
device-tree-compiler
libunwind
openjdk
mpfr
llvm
ASIA 2013 (LCA13)
www.linaro.org
LEG priorities
grub2
TBB
openssl
libatomic-ops
gmp
libgcrypt
php
postgres
mysql
libaio
...
ASIA 2013 (LCA13)
www.linaro.org
Wider importance
Existing code used all over the place / highly embedded
zlib
gc
libjpeg
dlmalloc
nss
gnulib
…
ASIA 2013 (LCA13)
www.linaro.org
Not important for LEG
But will matter to other people
Multimedia libs
libav
libmad
...
Games
Plenty of things for us to point developers at...
Maybe GSOC project or similar?
ASIA 2013 (LCA13)
www.linaro.org
Provide help for developers
Guide them to do the right thing
Code examples
Use the compiler, don't work around it
Provide library support for common functions
Glibc / elsewhere?
Talk to them...
ASIA 2013 (LCA13)
www.linaro.org
Conclusions
Most software doesn't need porting!
Even most of those including assembly will already work on
ARMv7 and ARMv8
Most assembly is (essentially) pointless
We have things to work on, let's go!
Data in Google Docs at http://goo.gl/6z2C8
More about Linaro Connect: www.linaro.org/connect/
More about Linaro: www.linaro.org/about/
More about Linaro engineering: www.linaro.org/engineering/
ASIA 2013 (LCA13)

Weitere ähnliche Inhalte

Was ist angesagt?

HTML5 Programming
HTML5 ProgrammingHTML5 Programming
HTML5 Programming
hotrannam
 
Is ruby logger thread(process)-safe? at RubyConf 2013
Is ruby logger thread(process)-safe? at RubyConf 2013Is ruby logger thread(process)-safe? at RubyConf 2013
Is ruby logger thread(process)-safe? at RubyConf 2013
Naotoshi Seo
 
Java Logging discussion Log4j,Slf4j
Java Logging discussion Log4j,Slf4jJava Logging discussion Log4j,Slf4j
Java Logging discussion Log4j,Slf4j
Rajiv Gupta
 

Was ist angesagt? (14)

The basics of fluentd
The basics of fluentdThe basics of fluentd
The basics of fluentd
 
Ropython-windbg-python-extensions
Ropython-windbg-python-extensionsRopython-windbg-python-extensions
Ropython-windbg-python-extensions
 
HTML5 Programming
HTML5 ProgrammingHTML5 Programming
HTML5 Programming
 
Compilation and Execution
Compilation and ExecutionCompilation and Execution
Compilation and Execution
 
CNIT 127: Ch 8: Windows overflows (Part 2)
CNIT 127: Ch 8: Windows overflows (Part 2)CNIT 127: Ch 8: Windows overflows (Part 2)
CNIT 127: Ch 8: Windows overflows (Part 2)
 
Self-Hosted Scripting in Guile
Self-Hosted Scripting in GuileSelf-Hosted Scripting in Guile
Self-Hosted Scripting in Guile
 
Native hook mechanism in Android Bionic linker
Native hook mechanism in Android Bionic linkerNative hook mechanism in Android Bionic linker
Native hook mechanism in Android Bionic linker
 
Is ruby logger thread(process)-safe? at RubyConf 2013
Is ruby logger thread(process)-safe? at RubyConf 2013Is ruby logger thread(process)-safe? at RubyConf 2013
Is ruby logger thread(process)-safe? at RubyConf 2013
 
Batch import of large RDF datasets into Semantic MediaWiki
Batch import of large RDF datasets into Semantic MediaWikiBatch import of large RDF datasets into Semantic MediaWiki
Batch import of large RDF datasets into Semantic MediaWiki
 
IDLs
IDLsIDLs
IDLs
 
Deep drive into rust programming language
Deep drive into rust programming languageDeep drive into rust programming language
Deep drive into rust programming language
 
Java Logging discussion Log4j,Slf4j
Java Logging discussion Log4j,Slf4jJava Logging discussion Log4j,Slf4j
Java Logging discussion Log4j,Slf4j
 
Fluentd - Set Up Once, Collect More
Fluentd - Set Up Once, Collect MoreFluentd - Set Up Once, Collect More
Fluentd - Set Up Once, Collect More
 
Docker and .NET Core - Best Friends Forever - Michael Newton - Codemotion Rom...
Docker and .NET Core - Best Friends Forever - Michael Newton - Codemotion Rom...Docker and .NET Core - Best Friends Forever - Michael Newton - Codemotion Rom...
Docker and .NET Core - Best Friends Forever - Michael Newton - Codemotion Rom...
 

Andere mochten auch

Andere mochten auch (8)

Tabla soporte exportaciones_importaciones_febrero_2011_0
Tabla soporte exportaciones_importaciones_febrero_2011_0Tabla soporte exportaciones_importaciones_febrero_2011_0
Tabla soporte exportaciones_importaciones_febrero_2011_0
 
Portafolio2
Portafolio2Portafolio2
Portafolio2
 
Empire magazine front covers analysis
Empire magazine front covers analysisEmpire magazine front covers analysis
Empire magazine front covers analysis
 
Asignaturas ESO
Asignaturas ESOAsignaturas ESO
Asignaturas ESO
 
Nw 2014073120-ebola 2
Nw 2014073120-ebola 2Nw 2014073120-ebola 2
Nw 2014073120-ebola 2
 
Lights!!!!
Lights!!!!Lights!!!!
Lights!!!!
 
Prezentacia krygovorot vody v prirode
Prezentacia krygovorot vody v prirodePrezentacia krygovorot vody v prirode
Prezentacia krygovorot vody v prirode
 
Notas finales udes grupo medellin 15 diseño de software
Notas finales udes grupo medellin 15 diseño de softwareNotas finales udes grupo medellin 15 diseño de software
Notas finales udes grupo medellin 15 diseño de software
 

Ähnlich wie LCA13: Optimisation and Assembly

Leveraging Android's Linux Heritage at AnDevCon VI
Leveraging Android's Linux Heritage at AnDevCon VILeveraging Android's Linux Heritage at AnDevCon VI
Leveraging Android's Linux Heritage at AnDevCon VI
Opersys inc.
 

Ähnlich wie LCA13: Optimisation and Assembly (20)

From gcc to the autotools
From gcc to the autotoolsFrom gcc to the autotools
From gcc to the autotools
 
Toolchain
ToolchainToolchain
Toolchain
 
Ubuntu
UbuntuUbuntu
Ubuntu
 
Purdue CS354 Operating Systems 2008
Purdue CS354 Operating Systems 2008Purdue CS354 Operating Systems 2008
Purdue CS354 Operating Systems 2008
 
The NetBSD package Collection - a.k.a pkgsrc
The NetBSD package Collection - a.k.a pkgsrcThe NetBSD package Collection - a.k.a pkgsrc
The NetBSD package Collection - a.k.a pkgsrc
 
LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205LMG Lightning Talks - SFO17-205
LMG Lightning Talks - SFO17-205
 
LCA14: LCA14-403: Importance of migrating external projects used in Android t...
LCA14: LCA14-403: Importance of migrating external projects used in Android t...LCA14: LCA14-403: Importance of migrating external projects used in Android t...
LCA14: LCA14-403: Importance of migrating external projects used in Android t...
 
E bpf and dynamic tracing for mariadb db as (mariadb day during fosdem 2020)
E bpf and dynamic tracing for mariadb db as (mariadb day during fosdem 2020)E bpf and dynamic tracing for mariadb db as (mariadb day during fosdem 2020)
E bpf and dynamic tracing for mariadb db as (mariadb day during fosdem 2020)
 
XPDDS19: A Journey through Unikraft's Build System
XPDDS19: A Journey through Unikraft's Build SystemXPDDS19: A Journey through Unikraft's Build System
XPDDS19: A Journey through Unikraft's Build System
 
High Performance Scaling Techniques in Golang Using Go Assembly
High Performance Scaling Techniques in Golang Using Go AssemblyHigh Performance Scaling Techniques in Golang Using Go Assembly
High Performance Scaling Techniques in Golang Using Go Assembly
 
Road to sbt 1.0 paved with server
Road to sbt 1.0   paved with serverRoad to sbt 1.0   paved with server
Road to sbt 1.0 paved with server
 
Leveraging Android's Linux Heritage at AnDevCon VI
Leveraging Android's Linux Heritage at AnDevCon VILeveraging Android's Linux Heritage at AnDevCon VI
Leveraging Android's Linux Heritage at AnDevCon VI
 
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
Embedded Systems: Lecture 13: Introduction to GNU Toolchain (Build Tools)
 
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha[Pgday.Seoul 2018]  PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
[Pgday.Seoul 2018] PostgreSQL 성능을 위해 개발된 라이브러리 OS 소개 apposha
 
New Oracle Infrastructure2
New Oracle Infrastructure2New Oracle Infrastructure2
New Oracle Infrastructure2
 
Understanding and building Your Own Docker
Understanding and building Your Own DockerUnderstanding and building Your Own Docker
Understanding and building Your Own Docker
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Crystal internals (part 1)
Crystal internals (part 1)Crystal internals (part 1)
Crystal internals (part 1)
 
Root file system for embedded systems
Root file system for embedded systemsRoot file system for embedded systems
Root file system for embedded systems
 

Mehr von Linaro

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Linaro
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
Linaro
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Linaro
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
Linaro
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
Linaro
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
Linaro
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
Linaro
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
Linaro
 

Mehr von Linaro (20)

Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea GalloDeep Learning Neural Network Acceleration at the Edge - Andrea Gallo
Deep Learning Neural Network Acceleration at the Edge - Andrea Gallo
 
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta VekariaArm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
Arm Architecture HPC Workshop Santa Clara 2018 - Kanta Vekaria
 
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua MoraHuawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
Huawei’s requirements for the ARM based HPC solution readiness - Joshua Mora
 
Bud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qaBud17 113: distribution ci using qemu and open qa
Bud17 113: distribution ci using qemu and open qa
 
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
OpenHPC Automation with Ansible - Renato Golin - Linaro Arm HPC Workshop 2018
 
HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018HPC network stack on ARM - Linaro HPC Workshop 2018
HPC network stack on ARM - Linaro HPC Workshop 2018
 
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
It just keeps getting better - SUSE enablement for Arm - Linaro HPC Workshop ...
 
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
Intelligent Interconnect Architecture to Enable Next Generation HPC - Linaro ...
 
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
Yutaka Ishikawa - Post-K and Arm HPC Ecosystem - Linaro Arm HPC Workshop Sant...
 
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
Andrew J Younge - Vanguard Astra - Petascale Arm Platform for U.S. DOE/ASC Su...
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening KeynoteHKG18-100K1 - George Grey: Opening Keynote
HKG18-100K1 - George Grey: Opening Keynote
 
HKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP WorkshopHKG18-318 - OpenAMP Workshop
HKG18-318 - OpenAMP Workshop
 
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainlineHKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
HKG18-501 - EAS on Common Kernel 4.14 and getting (much) closer to mainline
 
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and allHKG18-315 - Why the ecosystem is a wonderful thing, warts and all
HKG18-315 - Why the ecosystem is a wonderful thing, warts and all
 
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse HypervisorHKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
HKG18- 115 - Partitioning ARM Systems with the Jailhouse Hypervisor
 
HKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMUHKG18-TR08 - Upstreaming SVE in QEMU
HKG18-TR08 - Upstreaming SVE in QEMU
 
HKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8MHKG18-113- Secure Data Path work with i.MX8M
HKG18-113- Secure Data Path work with i.MX8M
 
HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation HKG18-120 - Devicetree Schema Documentation and Validation
HKG18-120 - Devicetree Schema Documentation and Validation
 
HKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted bootHKG18-223 - Trusted FirmwareM: Trusted boot
HKG18-223 - Trusted FirmwareM: Trusted boot
 

Kürzlich hochgeladen

Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
WSO2
 

Kürzlich hochgeladen (20)

Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, AdobeApidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
Apidays New York 2024 - Scaling API-first by Ian Reasor and Radu Cotescu, Adobe
 
Cyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdfCyberprint. Dark Pink Apt Group [EN].pdf
Cyberprint. Dark Pink Apt Group [EN].pdf
 
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWEREMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
EMPOWERMENT TECHNOLOGY GRADE 11 QUARTER 2 REVIEWER
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
Emergent Methods: Multi-lingual narrative tracking in the news - real-time ex...
 
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
Apidays New York 2024 - The Good, the Bad and the Governed by David O'Neill, ...
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 
MS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectorsMS Copilot expands with MS Graph connectors
MS Copilot expands with MS Graph connectors
 
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
Apidays New York 2024 - Passkeys: Developing APIs to enable passwordless auth...
 
Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024Manulife - Insurer Transformation Award 2024
Manulife - Insurer Transformation Award 2024
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024MINDCTI Revenue Release Quarter One 2024
MINDCTI Revenue Release Quarter One 2024
 
FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024FWD Group - Insurer Innovation Award 2024
FWD Group - Insurer Innovation Award 2024
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
ICT role in 21st century education and its challenges
ICT role in 21st century education and its challengesICT role in 21st century education and its challenges
ICT role in 21st century education and its challenges
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024Axa Assurance Maroc - Insurer Innovation Award 2024
Axa Assurance Maroc - Insurer Innovation Award 2024
 
Architecting Cloud Native Applications
Architecting Cloud Native ApplicationsArchitecting Cloud Native Applications
Architecting Cloud Native Applications
 

LCA13: Optimisation and Assembly

  • 1. ASIA 2013 (LCA13) Optimisation and Assembly Steve McIntyre <steve.mcintyre@linaro.org>
  • 2. ASIA 2013 (LCA13) www.linaro.org Summary – scanning for assembly Final total: 1435 packages analysed Package lists from Ubuntu and Fedora Tedious work! Takes a long time to scan thoroughly
  • 3. ASIA 2013 (LCA13) www.linaro.org Analysis Looking for: Assembly source files Files containing inline assembly Not looking for Use of intrinsics for SIMD work Maybe worth revisiting in future
  • 4. ASIA 2013 (LCA13) www.linaro.org Methods Two lists of packages provided Ubuntu list from Kiko and Matthias Klose Fedora list from Al Stone and Jon Masters Two different scan method to generate these lists One person (me!) reading the source Unpack Look for all likely-looking source files (*.[sS] *.asm *.ASM etc.) Look for inline assembly in other source files See how (and if!) the assembly code is actually used
  • 5. ASIA 2013 (LCA13) www.linaro.org Categories Broad classification of results for each package: Atomics (10.0%) Embedded library code (18.1%) False positives (11.1%) Lowlevel (38.1%) OtherOS (9.3%) Performance (30.4%) Symbols/sections etc. (2.9%) Ignorable packages too... architecture-specific packages
  • 6. ASIA 2013 (LCA13) www.linaro.org Common findings Lots and lots (and lots) of assembly for Trivial byteswap code Hardware identification (CPUID) Timer access (RDTSC) SIMD (MMX/SSE/Altivec/NEON) – media libs Trivial atomics FPU control
  • 7. ASIA 2013 (LCA13) www.linaro.org Far too many embedded libraries gnulib gettext (well, not really) gc sqlite zlib libjpeg ...
  • 8. ASIA 2013 (LCA13) www.linaro.org Patterns The Good Many packages are using gcc intrinsics Some newer versions of software moving away from inline asm The Bad Lots of cargo-culted asm Far too many embedded libraries especially in larger projects like browsers The Ugly^WComical Compiler workarounds from 1990s VAX(!) assembly in 10 packages Asm in place, but not actually enabled/used
  • 9. ASIA 2013 (LCA13) www.linaro.org Priorities for porting work Arbitrarily assigned priorities thus far... What's considered important for LEG – server workloads Dependencies Looking at Ubuntu-recommended server packages as a guide Boost priorities for webserver workloads for now Low priority for some types of package Desktop apps Multimedia libs Games
  • 10. ASIA 2013 (LCA13) www.linaro.org Top 20? It's not that easy! Lots of toolchain and core libs are already done or in hand gcc (e)glibc klibc libffi binutils gdb device-tree-compiler libunwind openjdk mpfr llvm
  • 11. ASIA 2013 (LCA13) www.linaro.org LEG priorities grub2 TBB openssl libatomic-ops gmp libgcrypt php postgres mysql libaio ...
  • 12. ASIA 2013 (LCA13) www.linaro.org Wider importance Existing code used all over the place / highly embedded zlib gc libjpeg dlmalloc nss gnulib …
  • 13. ASIA 2013 (LCA13) www.linaro.org Not important for LEG But will matter to other people Multimedia libs libav libmad ... Games Plenty of things for us to point developers at... Maybe GSOC project or similar?
  • 14. ASIA 2013 (LCA13) www.linaro.org Provide help for developers Guide them to do the right thing Code examples Use the compiler, don't work around it Provide library support for common functions Glibc / elsewhere? Talk to them...
  • 15. ASIA 2013 (LCA13) www.linaro.org Conclusions Most software doesn't need porting! Even most of those including assembly will already work on ARMv7 and ARMv8 Most assembly is (essentially) pointless We have things to work on, let's go! Data in Google Docs at http://goo.gl/6z2C8
  • 16. More about Linaro Connect: www.linaro.org/connect/ More about Linaro: www.linaro.org/about/ More about Linaro engineering: www.linaro.org/engineering/ ASIA 2013 (LCA13)