是什么WAIT_FOR_CONCURRENT_GC阻塞是什么意思? [英] what does WAIT_FOR_CONCURRENT_GC blocked mean?

查看:2637
本文介绍了是什么WAIT_FOR_CONCURRENT_GC阻塞是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我只是做了从ICS(4.0.4),以JB(4.1)自动更新我的Andr​​oid手机,它推出的时候我跑我的应用程序的多个垃圾收集调用:

I just did an automatic update from ICS (4.0.4) to JB (4.1) on my android phone and it introduced multiple garbage collection calls when I run my app:

WAIT_FOR_CONCURRENT_GC blocked 30ms

我的视频流在我的应用程序,这些被阻止GC调用几乎翻了一番我的等待时间,它们意味着什么?

I'm streaming video in my app and these blocked GC calls are almost doubling my latency, what do they mean?

推荐答案

这消息是在一对夫妇的情况下发出的:

That message is emitted in a couple of cases:

  • 当用户code明确要求GC()和GC已在进行中。
  • 当code试图做分配,但没有实际房间内存以满足要求,而GC已在进行中。

在这两种情况下,什么发生的是,为了满足该请求,第一步骤是等待热垃圾收集行动真实发生在另一个线程。一旦这样做了,那么线程可以移动到它是更直接的要求做(这可能会导致进一步的垃圾收集)。

In either case, what's happening is that, in order to satisfy the request, the first step is waiting for the hot garbage collecting action that's taking place in another thread. Once that's done, then the thread can move onto what it was more directly asked to do (which might cause further garbage collection).

您可以找到突出的源平台/达尔维克/ VM /页头,特别是Heap.cpp和Alloc.cpp。

You can find the salient sources in platform/dalvik/vm/alloc, particularly Heap.cpp and Alloc.cpp.

所有这一切说,我不能告诉你为什么你会看到在JB更多的停顿比ICS。

All that said, I can't tell you why you're seeing more pauses in JB than in ICS.

这篇关于是什么WAIT_FOR_CONCURRENT_GC阻塞是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆