Code Monkey home page Code Monkey logo

map-memory-analysis's Introduction

Map Memory Analysis

GCC map file memory analysis and report. It's helpful for locating the large costs, optimizing and debugging.

Workflow

  1. Read sections from map file with scanner, a async-generator.
  2. Classify section contents into certain modules dictionary.
  3. Format module into DataFrame.
  4. Render the DataFrame into html page.

Required

The following python third-party libraries need to be installed first, e.g. pip install lib_name:

  • pandas: A powerful data processor.
  • pyecharts: A expressive chart library.
  • pyyaml: YAML is the data serialization language of the configuration file of this project.

Start working

Configuration:

The following configuration file is used for a more accurate analysis.

# Classify the objects of section into certain classification.
# Three rule types are provided:
# 1.[match_re. The re needs to have one group "()"],
# 2.[match_re, classification],
# 3.[match_str, classification]
classification_rules:
  - match_re: ^\./sdk/(\w+)/[/\w]*\w+\.o
  - match_re: ^\.[/\w\-]+\.o
    classification: application
  - match_str: lib/gcc/arm-none-eabi
    classification: gcc

# Group sections according to your lds file and count the group size.
section_group_sizes:
  text: [ sections... ]
  data: [ sections... ]

Generate:

Run the test case from command line

cd map-memory-analysis
python test/test.py

or add the following code to your own python project

from mapreport import Report

Report(map_file_path, config_file_path, output_path).generate_report()

the report will be generated to output_path/report.

Report:

This is a demo report Report.html.

map-memory-analysis's People

Contributors

hathatehack avatar

Watchers

 avatar

Forkers

killbill920

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.