Git Product home page Git Product logo

tracereader's Introduction

TraceReader

1.简述

Android 调试工具ddms的devices栏目存在一个功能叫做start method profiling,此按钮顾名思义是启动method profiling的,而Android的Method Profiling功能,是可以在一段时间内记录所有运行过的函数,最后生成一个xxx.trace文件。xxx.trace文件比较有趣,如果分析andorid源码可以知道,xxx.trace文件按线程和时间记录了method的enter和exit事件。也就是说,如果我们能够读取xxx.trace文件,那么我们就能够获取到某段时间,某个app运行过的java函数。

2.功能

 于是乎,便有个这个工具,目前更新到TraceReader v1.1,实现了如下功能:
1)支持拖拽解析xx.trace。
image
2)支持显示线程。
image
3)支持树形显示方法调用
image
4)支持按列显示运行方法
image
5)支持搜索
image
6)支持复制、重命名
image
image
7)支持显示调用时间
image
image

3.用法

 解析trace文件,用法如下:

  byte[] bytes=BytesHelper.toByteArray(fl.getPath());
  Trace trace=new Trace(bytes);		 
  trace.getThreadList();

3.原理

TODO….

tracereader's People

Contributors

panhongwei avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.