Coder Social home page Coder Social logo

extrace's People

Contributors

littlewhywhat avatar

Watchers

 avatar

extrace's Issues

Trace doesn't seem to clean

dump entries are not in chronological order.

There exists a border that divides new records from old ones.

Scanning command names in sched entries that has space in the name

for example:

// 'POSIX timer 1'
 prev_comm=DispSync prev_pid=1081 prev_prio=97 prev_state=S ==> next_comm=POSIX timer 1 next_pid=1085 next_prio=112

// AsyncTask #18
prev_comm=.android.dialer prev_pid=2045 prev_prio=110 prev_state=S ==> next_comm=AsyncTask #18 next_pid=2682 next_prio=130

// 'POSIX timer 1' 
comm=POSIX timer 0 pid=1083 prio=112 success=1 target_cpu=000

Create usage example

emulator #./data/extrace
usage: ./data/extrace [options]
options include:
  -a app_package  enable app-level tracing for a comma
                  separated list of package names
  -b N            use a trace buffer size of N KB
  -c              trace into a circular buffer
  -d aname,...    trace the listed android categories
  -e kname,...    trace the listed kernel categories
  -f filename     use the categories written in a file as space-separated
                    values in a line
  -p N            period of memory measurement
  -m N            number of periods to pass
  -pids N,...     PIDs to take memory measurement of
  -minCpu N       minimal CPU usage that should trace record have to display to user
  -minUss N       minimal Uss that should a trace record have to be displayed to user
  -n              ignore signals
  -s N            sleep for N seconds before tracing [default 0]
  -t N            trace for N seconds [default 5]
  -z              compress the trace dump
  --async_start   start circular trace and return immediatly
  --async_dump    dump the current contents of circular trace buffer
  --async_stop    stop tracing and dump the current contents of circular
                    trace buffer
  --stream        stream trace to outstream as it enters the trace buffer
                    Note: this can take significant CPU time, and is best
                    used for measuring things that are not affected by
                    CPU performance, like pagecache usage.
  --list_categories
                  list the available tracing categories
 -o filename      write the trace to the specified file instead
                    of outstream.
 --acore          add core services.

Events doesn't apply to all processes

for example, command:

./data/extrace -a com.android.dialer -e sched -t 10 -p 1000000 -m 1000 -pids 2045,1343 -o /data/out 2>/dev/null > /data/after_out

creates output like this:

---------------------------------------------------------------------------------------
 | 2045|onBindViewHolder: 6
---------------------------------------------------------------------------------------
 |  1343 |   0 % |  783228K |  125480K |   72107K |   63060K |  3928317006 | SLEEPING |
---------------------------------------------------------------------------------------
 | 2045|RV CreateView
---------------------------------------------------------------------------------------
 |  1343 |   0 % |  783228K |  125480K |   72107K |   63060K |  3928319100 | SLEEPING |
---------------------------------------------------------------------------------------
 | 2045|RV OnBindView
---------------------------------------------------------------------------------------
 |  1343 |   0 % |  783228K |  125480K |   72107K |   63060K |  3928319106 | SLEEPING |
---------------------------------------------------------------------------------------
 | 2045|onBindViewHolder: 7
---------------------------------------------------------------------------------------
 |  1343 |   0 % |  783228K |  125560K |   72189K |   63144K |  3928337821 | SLEEPING |
---------------------------------------------------------------------------------------
 | MemTrace
--------------------------------------------------------------------------------------- 
 |  1343 |   0 % |  783228K |  125560K |   72189K |   63144K |  3928342621 |    AWAKE |
---------------------------------------------------------------------------------------
 | SchedWakeup
---------------------------------------------------------------------------------------

but these events 2045|onBindViewHolder - doesn't appear in list of events for pid 2045.

first onBindView is 3928044195 on line 11931. first record for 2045 is 3922135822 on line 96.

in fact no onBindView is applied to process 2045...
after_out.txt
init_out.txt

setup ethernet connection on startup

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.