2 天前

matrix 发布版本: V0.5.1/2019-04-16

## Matrix - Android ### Matrix-TraceCanary #### 增加卡顿信息收集 - 发生 ANR 时,获取应用当前的内存信息,包括:Native Heap、Java Heap、VmSize; - 发生 ANR 时,通过 Thread.getStackTrace 的方式,额外获取主线程堆栈及State; - 统计系统帧事件处理时,Choreographer 中三种类型队列 CALLBACK_INPUT、CALLBACK_ANIMATION、CALLBACK_TRAVERSAL 各自处理的耗时; - 卡顿发生时,统计当前主线程的 CPU 利用率; #### 提升卡顿定位精确度 - 监控主线程 Looper#handleMessage 的方式来捕捉卡顿的耗时堆栈,替换原先通过 Choreographer#doFrame 的回调方式监控两帧之间的堆栈,使堆栈更完整更清晰。 - 废除 TracePlugin 依赖前后台事件来触发是否开启监控,避免切换前后台的临界范围监控不到。 #### 加快编译插桩速度 - 拆分任务,支持多线程并发读取及操作字节码文件; #### 规避功耗问题 - 计算帧率,采用一种应用本身有帧事件处理才通知的方式,替换原先通过Choreographer#postFrameCallback 主动触发帧事件通知的方式,避免在应用本无帧事件处理时,仍然需要不断处理本模块 post 的帧事件回调; - 时间线程更新策略调整,不依赖前后台来判断是否运作,通过 Looper#handleMessage 的开始和结束点来决定是否执行,避免主线程在无任务处理时,时间线程仍旧不停工作,导致功耗问题。 #### 解耦重构 - 废弃之前 MethodBeat 中 lockBuffer 及 resetBuffer 的方式,采用 IndexRecord 链表记录各个模块 mark 的 index 方式代替,解耦各个模块对 MethodBeat 中 buffer 的依赖。 - 将 ANR 监控从 EvilMethodTracer 模块抽离为独立的模块 AnrTracer - 简单化堆栈裁剪及 stackKey 计算策略 #### bugfix - 修复一些已知问题,如堆栈耗时对不上,编译时crash,后台耗电,兼容9.0启动监控等。 #### 关于Sample - 增加帧率监控浮窗显示 FrameDecorator

2 天前

swoole-src 发布版本: v4.3.2

Enhancement --- + Dynamically `ipc_size`, greatly improving IPC performance in Process mode (48c1b2b) (3e85511) (@matyhtf) + Improve `Runtime::enableCoroutine` API, support passing in flag directly as the first parameter (464ad65) (7d4be65) (@twose) + SSL connection will automatically configure the ssl_host_name (563e677) (@twose) + Some NOTICE level information will be changed to INFO level, such as server restart information, etc (d87d63a) (@twose) + Add constants for`dispatch_func` return value: `SWOOLE_DISPATCH_RESULT_DISCARD_PACKET`, `SWOOLE_DISPATCH_RESULT_USERFUNC_FALLBACK` (#2451) (@windrunner414) + `swoole_strerror` support parse system error code and swoole error code automatically (d89c565) (#2458) (@twose) (@mabu233) + Built-in Socket related constants, and it would not conflict with Socket extensions (1e1b1d1) (@twose) + Add http_parse_cookie option (dce290ef) (@twose) + Decode path_info (82f8e4fc) (@twose) + Support PHP_STREAM_OPTION_CHECK_LIVENESS (6ff292da) (@twose) Fixed --- * Fixed `CID-1478883`, `CID-1478887`, `CID-1478891`, `CID-1478894` (688713f) (17805af) (e8f1473) (58a098f) (@matyhtf) * Fixed invalid memory access due to fd reuse (08b37fd) (@twose) * Fixed connection reset due to fd reuse (#2444) (@twose) * Fixed the bug where the GC didn't work during the shutdown (causing a memory leak) (836ea23) (15ba9f7) (@twose) * Fixed the invalidation of `Co\Iterator` (db9e155) (@twose) * Fixed`Co::exec` causes process stuck (8a1d776) (22252d7) (@matyhtf) * Fixed BADF caused by `exportSocket` (ebbce67) (c7af14c) (c717122) (@matyhtf) * Complete `Swoole\Buffer` property declaration (2f66319) (@twose) * Complete `Co::exec` arg info (7da1376) (@twose) * Fixed the wrong error code when the MySQL client host was invalid (#2367) (@twose) * Fixed the problem that the sync client is interrupted by the signal (#2448) (@liues1992) * Fixed build check with `i?86/aarch64` (#2460) (@dixyes) * Fixed `poll` with timeout `0` (1143743) (@matyhtf) * Fixed `stream_select` with `null` timeout (e8a58d5) (c166b7a) (@twose) * Fixed `stream_select` behavior (d8e7a41) (3ce877d) (2819232) (cd8e4c7) (@twose) (@matyhtf) * Generate Swoole Warning instead of PHP Warning (unmanageable error) (955d021) (@twose) * Fixed `Co\Client` construct failed (#2466) (@twose) * Fixed Http2 cookie (e18d66b) (@twose) * Fixed `Process->getProcess` free (fe1ca17) (@matyhtf) * Fixed Coroutine flock (23401d8) (86cf0c9) (@matyhtf) * Fixed `Co\Http2\Client` null ptr (66c31ee) (@twose) * Fixed `Socket->accept` return Socket object with uninitialised type (5d26b00) (@twose) * Fixed `Co\Http\Client` with websocket protocol can not support full duplex (#2477) (523c588) (@twose) * Complete `Event::dispatch`, `Event::isSet` method arg info (#2491) (@deminy) * Fixed invalid `Connection\Iterator` (#2492) (@matyhtf) * Fixed `reload_async` with Timer (9eaf32cc) (bacb5228) (@matyhtf) (@twose) * Cannot use msgqueue when task_enable_coroutine is enable (#2497) (@matyhtf) * Fixed `read_eof` bug (e936c764) (@matyhtf) * Sockets C++ compatibility (3cf7dcba) (@twose)