Android Fence timeout

Fence的中文意思可以理解为栅栏,但是Android fence是一个用来同步的东西,可以形象的理解为栅栏,把不同的动作拦截区分,A fence sync object is used to wait for completion of the corresponding fence command,这个意思是说这是一个用来等待响应fence命令完成的对象。用来做同步用的。The fence sync object is used to synchronize tasks and protect resources among multiple threads,fence被用来在多线程中做任务的同步。

sync_timeline :An abstract monotonically increasing counter.一个抽象的单调递增的计数器

sync_pt :An abstract value which marks a point on a sync_timeline.一个抽象值,用来标记在sync_timeline上的一个点

sync_fence: The primary primitives used by drivers to coordinate synchronization of their buffers.用来驱动协调缓冲区同步的主要原语对象

如果一个fence没有被提前的信号标记(signaled),那么这时候fence time out就发生了。

为了标记一个fence我们必须让每个绑定到sync_fence的sync_pt退休retired。否则无法完成新标价。

当fence time out发生了以后我们要确定是哪个sync_pt没有retired,

通过上面的示例可以作为一个简单的分析过程。

 Trace points are the primary way to debug KGSL fence timeouts  Enable below trace points to trace kgsl events related with fence issue  With this configuration we can check how long each GPU command batch is taking between queued, submitted and retired

  kgsl_register_event — to confirm event callback function registered  kgsl callback function eventually calls sync_timeline_signal()  kgsl_fire_event — to confirm callback is called after cmd batch retired  adreno_cmdbatch_queued/submitted/retired — to confirm GPU command is properly queued, submitted and retired

 

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值