From 5d9a7ba0dc9c24ed4e4efa9cac0e796fd524b308 Mon Sep 17 00:00:00 2001 From: Elliott Hughes Date: Fri, 30 May 2014 19:00:03 -0700 Subject: Avoid a system call in 'gettid'. System calls can be pretty slow. This is mako, which has one of our lowest latencies: iterations ns/op BM_unistd_getpid 10000000 209 BM_unistd_gettid 200000000 8 Bug: 15297299 (kernel panic from too many gettid calls) Bug: 15315766 (excessive gettid overhead in liblogd) Change-Id: I49656c0fc5b5d092390264a59e4f2c0d8a8b1aeb --- libc/arch-mips/syscalls/gettid.S | 19 ------------------- 1 file changed, 19 deletions(-) delete mode 100644 libc/arch-mips/syscalls/gettid.S (limited to 'libc/arch-mips/syscalls') diff --git a/libc/arch-mips/syscalls/gettid.S b/libc/arch-mips/syscalls/gettid.S deleted file mode 100644 index cfdc57b..0000000 --- a/libc/arch-mips/syscalls/gettid.S +++ /dev/null @@ -1,19 +0,0 @@ -/* Generated by gensyscalls.py. Do not edit. */ - -#include - -ENTRY(gettid) - .set noreorder - .cpload t9 - li v0, __NR_gettid - syscall - bnez a3, 1f - move a0, v0 - j ra - nop -1: - la t9,__set_errno - j t9 - nop - .set reorder -END(gettid) -- cgit v1.1