龙芯 Linux 内核 VDSO 现状测试

http://ask.loongnix.org/?/article/418

 

好久之前记得龙芯上 VDSO 支持很有问题,前一阵终于获得少量空闲时间,又测了一下,发现还是不行,跑这么一个脚本发现大量 clock_gettime 系统调用。(amd64 上除了用于实现 sleep 的 select 之外没有任何 gettimeofday 或者 clock_gettime 的调用。)

#!/usr/bin/env python3

import time

for i in range(100):
    time.sleep(0.01)
    _ = time.time()


翻 glibc 源码时候 git log 看到一个叫 vdsotest 的工具,于是弄下来跑了一遍。
 
测试环境:

  

clock-gettime-monotonic: syscall: 409 nsec/callclock-gettime-monotonic:    libc: 476 nsec/callclock-gettime-monotonic:    vdso: 462 nsec/callNote: vDSO version of clock_getres not foundclock-getres-monotonic: syscall: 323 nsec/callclock-getres-monotonic:    libc: 346 nsec/callclock-getres-monotonic:    vdso: not testedNote: vDSO version of clock_getres not foundNote: vDSO version of clock_getres not foundclock-gettime-monotonic-coarse: syscall: 374 nsec/callclock-gettime-monotonic-coarse:    libc: 115 nsec/callclock-gettime-monotonic-coarse:    vdso: 98 nsec/callpassing UINTPTR_MAX to clock_gettime (VDSO): terminated by unexpected signal 10clock-gettime-monotonic-coarse/abi: 1 failures/inconsistencies encounteredNote: vDSO version of clock_getres not foundclock-getres-monotonic-coarse: syscall: 357 nsec/callclock-getres-monotonic-coarse:    libc: 379 nsec/callclock-getres-monotonic-coarse:    vdso: not testedNote: vDSO version of clock_getres not foundNote: vDSO version of clock_getres not foundclock-gettime-monotonic-raw: syscall: 406 nsec/callclock-gettime-monotonic-raw:    libc: 455 nsec/callclock-gettime-monotonic-raw:    vdso: 425 nsec/callNote: vDSO version of clock_getres not foundclock-getres-monotonic-raw: syscall: 323 nsec/callclock-getres-monotonic-raw:    libc: 346 nsec/callclock-getres-monotonic-raw:    vdso: not testedNote: vDSO version of clock_getres not foundNote: vDSO version of clock_getres not foundclock-gettime-tai: syscall: 422 nsec/callclock-gettime-tai:    libc: 472 nsec/callclock-gettime-tai:    vdso: 449 nsec/callNote: vDSO version of clock_getres not foundclock-getres-tai: syscall: 323 nsec/callclock-getres-tai:    libc: 345 nsec/callclock-getres-tai:    vdso: not testedNote: vDSO version of clock_getres not foundNote: vDSO version of clock_getres not foundclock-gettime-boottime: syscall: 421 nsec/callclock-gettime-boottime:    libc: 471 nsec/callclock-gettime-boottime:    vdso: 450 nsec/callNote: vDSO version of clock_getres not foundclock-getres-boottime: syscall: 324 nsec/callclock-getres-boottime:    libc: 346 nsec/callclock-getres-boottime:    vdso: not testedNote: vDSO version of clock_getres not foundNote: vDSO version of clock_getres not foundclock-gettime-realtime: syscall: 405 nsec/callclock-gettime-realtime:    libc: 474 nsec/callclock-gettime-realtime:    vdso: 457 nsec/callNote: vDSO version of clock_getres not foundclock-getres-realtime: syscall: 323 nsec/callclock-getres-realtime:    libc: 348 nsec/callclock-ge
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值