square / haha Goto Github PK
View Code? Open in Web Editor NEWDEPRECATED Java library to automate the analysis of Android heap dumps.
License: Apache License 2.0
DEPRECATED Java library to automate the analysis of Android heap dumps.
License: Apache License 2.0
The retained size of an instance is different from the one showed in Android studio profiler, as native heap size is missing. Is it possible to achieve it from the android hprof file?
Hi I'm getting an missing EnclosingMethod warning when I compile leak canary and I believe its caused by HAHA having an outdated compiler version. Can you upgrade the compiler version to 1.7?
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(com.squareup.haha.guava.base.Joiner$1) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is *not* an inner class.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(com.squareup.haha.guava.collect.Iterables$3) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is *not* an inner class.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(com.squareup.haha.guava.collect.Iterables$2) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is *not* an inner class.
When using 'com.squareup.leakcanary:leakcanary-android:1.4-beta2' I get the following errors each time I build the app. The app still builds just fine, but the errors do appear each time I build:
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(com.squareup.haha.guava.base.Joiner$1) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is *not* an inner class.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(com.squareup.haha.guava.collect.Iterables$2) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is *not* an inner class.
Error:warning: Ignoring InnerClasses attribute for an anonymous inner class
Error:(com.squareup.haha.guava.collect.Iterables$3) that doesn't come with an
Error:associated EnclosingMethod attribute. This class was probably produced by a
Error:compiler that did not target the modern .class file format. The recommended
Error:solution is to recompile the class from source, using an up-to-date compiler
Error:and without specifying any "-target" type options. The consequence of ignoring
Error:this warning is that reflective operations on this class will incorrectly
Error:indicate that it is *not* an inner class.
@pyricau Appologies first as this might be a beginner's question.
I saw Snapshot.computeDominators method in haha 2.0.4 is a very old version(the old version had a TODO: "Break dominator computation into fixed chunks, because it can be unbounded/expensive.").
this code snippets is from haha 2.0.4
Actually AOSP perflib had already a fix in 2015, see this: https://android.googlesource.com/platform/tools/base/+/72b27494b12ef02e0a9435a9b6451c0e61461074%5E%21/#F6
The current source jar contains classes under their original packages, not the renamespaced one (e.g. com/android/tools/perflib/heap/ArrayInstance.java
instead of com/squareup/haha/perflib/ArrayInstance.java
).
This means that IntelliJ shows decompiled classes instead of real sources, and people who want to make source modifications can't rebuild from the source jar.
After dump hprof file:
snapshot = Snapshot.createSnapshot(buffer);
snapshot.computeDomintors();
The param values shallowSize, instanceCount are correct; but totalRetainedSize, nativeSize are incorrect compare to hprof(which show in Android Studio).
LeakCanary 1.4-beta is showing this "Leak analysis failed" that seems to come from haha
when I use 2.0.4, I got a error , can't find class com.squareup.haha.trove.THashMap.
use 2.0.3 is OKใ
Hi @pyricau , Where could I find the design doc for haha?
There were not many comments in source code, which is a little difficult for a beginner to read
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.