uber / nanoscope-art

Apache License 2.0
49 stars 13 forks source link

Include class name in more ClassLinker spans. Fix bug. #10

Closed AttwellBrian closed 6 years ago

AttwellBrian commented 6 years ago

1) Include the class name in more spans. There isn't a one to one mapping between Initialize() calls DefineClase() calls. So I wanted to include names in both Initialize() and DefineClass() calls. However, instead of directly including the name inside DefineClass() calls I profile LoadClass() and LinkClass() calls (since the name isn't reliably setup at the beginning of DefineClass()) 2) No longer rely on the descriptor passed around. In some rare circumstances (mostly proxy classes) this descriptor doesn't exist inside a global scope. This fixes https://github.com/uber/nanotracer-art/issues/8.

Some background on how often these class linker methods get called on the main thread:

RIDER APP STARTUP: LinkClass: 21354 DefineClass: 21354 LoadClass: 20806 InitializeClass: 10320

RIDER APP CONFIRMATION TRANSITION: LinkClass: 357 DefineClass: 356 LoadClass: 356 InitializeClass: 1,240 Methods In Span: 400,000