transmittable-thread-local icon indicating copy to clipboard operation
transmittable-thread-local copied to clipboard

[wip] 使用byte-buddy重构agent增强功能,支持重新增强已经加载过的类

Open zfyq124 opened this issue 3 years ago • 3 comments

移除javaassit使用byte-buddy重构agent增强的功能 fix issue 226 支持重新增强已经加载过的类

只实现了基础线程的增强,扩展机制的增强与vertx还是开发中。请先review下关于线程池与ForkJoinTask的增强有没有错误

zfyq124 avatar Nov 03 '21 07:11 zfyq124

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you all sign our Contributor License Agreement before we can accept your contribution.
0 out of 2 committers have signed the CLA.

:x: zfyq124
:x: oldratlee
You have signed the CLA already but the status is still pending? Let us recheck it.

CLAassistant avatar Nov 03 '21 07:11 CLAassistant

考虑TTL agent的使用方式,

  • jar要独立自包含,即一个jar文件;期望将字节码库shade进来并repackage(防止类冲突/不兼容)
  • 期望jar文件比较小

使用byte-buddy 需要看看这些

支持重新增强已经加载过的类

这个是大家提到多次的需求 👍 @zfyq124

oldratlee avatar Nov 04 '21 04:11 oldratlee

考虑TTL agent的使用方式,

  • jar要独立自包含,即一个jar文件;期望将字节码库shade进来并repackage(防止类冲突/不兼容)

这个已经参考之前javassit方式处理了

  • 期望jar文件比较小

byte-buddy 本身就比较大(大约有3M)会造成新的ttl的交付jar由不足1M增长到4M左右。这个目前我还没有太好的处理方案

使用byte-buddy 需要看看这些

支持重新增强已经加载过的类

这个是大家提到多次的需求 👍 @zfyq124

由于jvm本身的限制我使用包装重写了之前ForkJoinTask的增强方案,这个需要重点关注下

zfyq124 avatar Nov 04 '21 13:11 zfyq124