{"id":13748546,"url":"https://github.com/square/haha","last_synced_at":"2025-05-09T11:30:45.894Z","repository":{"id":30837788,"uuid":"34395232","full_name":"square/haha","owner":"square","description":"DEPRECATED Java library to automate the analysis of Android heap dumps.","archived":true,"fork":false,"pushed_at":"2019-04-25T08:21:03.000Z","size":14318,"stargazers_count":1438,"open_issues_count":0,"forks_count":183,"subscribers_count":72,"default_branch":"master","last_synced_at":"2024-04-13T17:52:14.316Z","etag":null,"topics":["deprecated"],"latest_commit_sha":null,"homepage":"","language":"Java","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/square.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2015-04-22T14:29:19.000Z","updated_at":"2024-03-31T14:16:06.000Z","dependencies_parsed_at":"2022-08-23T09:10:53.387Z","dependency_job_id":null,"html_url":"https://github.com/square/haha","commit_stats":null,"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square%2Fhaha","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square%2Fhaha/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square%2Fhaha/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/square%2Fhaha/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/square","download_url":"https://codeload.github.com/square/haha/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224859699,"owners_count":17381676,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["deprecated"],"created_at":"2024-08-03T07:00:43.967Z","updated_at":"2024-11-15T23:30:22.971Z","avatar_url":"https://github.com/square.png","language":"Java","funding_links":[],"categories":["Java"],"sub_categories":[],"readme":"[![No Maintenance Intended](http://unmaintained.tech/badge.svg)](http://unmaintained.tech/)\n\n\n# Headless Android Heap Analyzer\n\n*“Ha Ha!”* - Nelson\n\n## This repository is DEPRECATED\n\n* This project was created to provide a heap dump parser for [LeakCanary](https://github.com/square/leakcanary) by repackaging heap dump parsers from other repositories.\n* LeakCanary now has its own [heap dump parser](https://github.com/square/leakcanary/tree/master/leakcanary-haha).\n* That parser is available on Maven Central as `com.squareup.leakcanary:leakcanary-haha:2.0-alpha-1`.\n\n## Introduction\n\nHAHA is a Java library to automate the analysis of Android heap dumps.\n\nThis project is essentially a repackaging of the work of others to make it available as a small footprint Maven dependency.\n\n## Usage\n\nTo learn how to dump the heap, read the [Android documentation](https://developer.android.com/tools/debugging/debugging-memory.html#HeapDump). Here's an example:\n\n``` java\nFile heapDumpFile = ...\nDebug.dumpHprofData(heapDumpFile.getAbsolutePath());\n```\n\nAfter dumping the heap, use HAHA to parse and analyze it.\n\n``` java\nDataBuffer buffer = new MemoryMappedFileBuffer(heapDumpFile);\nSnapshot snapshot = Snapshot.createSnapshot(buffer);\n\n// The rest is up to you.\nClassObj someClass = snapshot.findClass(\"com.example.SomeClass\");\n```\n\n## Gradle config\n\n``` groovy\ndependencies {\n  compile 'com.squareup.haha:haha:2.1'\n}\n```\n\n## Versions\n\n### HAHA 2.1\n\n* This release updates perflib to the `bc5c698efaf970f599e877a8b26de16736db4272` SHA of the android_platform_tool_base repo.\n* It also overlays a patched version of `HprofParser.java` to fix https://issuetracker.google.com/issues/122713143.\n\n### HAHA 2.0.4\n\nThis release separates out Trove4j from HAHA since Trove4j is available under LGPL 2.1 and HAHA is available under Apache 2.\n\n* This library contains parts of [perflib](https://android.googlesource.com/platform/tools/base/+/studio-master-dev/perflib) and is available under the same license, Apache v2.\n* It contains a repackaged version of Guava \n* It has an artifact dependency on a [fork of Trove4j](https://github.com/JetBrains/intellij-deps-trove4j) (\"1.1 with patches from JetBrains\") which is [available in jcenter](https://bintray.com/jetbrains/trove4j/trove4j) under the LGPL 2.1 license.\n* The result is merged in an uber-jar (perflib + guava) proguarded to remove unused code and reduce the footprint.\n\n### HAHA 2.0, 2.0.1, 2.0.2, 2.0.3\n\n* This library contains parts of [perflib](https://android.googlesource.com/platform/tools/base/+/studio-master-dev/perflib) and is available under the same license, Apache v2.\n* It contains a repackaged version of Guava and Trove4j \"1.1 with patches from JetBrains\"\n* Trove4j is available under the LGPL 2.1 license.\n* The result is merged in an uber-jar proguarded to remove unused code and reduce the footprint.\n\n### HAHA 1.1, 1.2 and 1.3\n\n* The first versions of HAHA were the result of a series of forks:\n* [Eclipse Memory Analyzer](https://eclipse.org/mat) (MAT) is a Java heap analyzer. It's a standalone GUI built with Eclipse RCP that embeds an engine to parse and analyze heap dumps.\n* [vshor/mat](https://bitbucket.org/vshor/mat) is a fork of *Eclipse Memory Analyzer*. It removed a lot of code and changed some of it to make a headless version (no GUI), as well as ignore weak references when finding paths to GC Roots.\n* [AndroMAT](https://bitbucket.org/joebowbeer/andromat/overview) is a fork of *vshor/mat* and changed the heap dump parsing to support Android specific heap dump format.\n* *HAHA* was originally a fork of *AndroMAT*. We recreated the lost Git history, kept the bare minimum needed code and packaged it to be releasable on Maven Central.\n* MAT is available under the Eclipse Public License v1.0 so HAHA was initially released under that same license.\n\n## Releasing\n\n```\nmvn release:prepare \u0026\u0026 mvn release:perform\n\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquare%2Fhaha","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsquare%2Fhaha","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsquare%2Fhaha/lists"}