{ "info": { "author": "Siddhesh Sathe", "author_email": "siddheshsathe@rediffmail.com", "bugtrack_url": null, "classifiers": [], "description": "[![Build Status](https://travis-ci.com/siddheshsathe/Valgrind-Log-Parser.svg?branch=master)](https://travis-ci.com/siddheshsathe/Valgrind-Log-Parser)\n# Valgrind Parser Tool\n---\nThis tool helps to parse the valgrind logs generated by a [valgrind](http://valgrind.org/) tool.\n\n## Pre-requisites\nThe only package needed for successful run of `valgrind_log_parser.py` is mentioned in `requirements.txt`.
\nUse pip to install these requirements.\n```bash\npip install -r requriements.txt\n```\n## Pip install\nOne can install valgrind parser tool from pip as well.\n```bash\npip install valgrind_parser\n```\nImport the package as\n```python\n>>> from valgrind_parser import ValgrindLogParser\n>>> vlp = ValgrindLogParser('/path/to/valgrind_logs.txt')\n>>> vlp.generate_html_report()\n```\nThis will dump the html report for input `valgrind_logs.txt` in the same directory from where the program was called.\n\n## Cloning the repo\n`Valgrind-Log-Parser` can also be used by cloning the repo locally and using the python file directly.\nClone the repo with below command and use as given in next sections.\n```bash\ngit clone git@github.com:/Valgrind-Log-Parser.git\n```\n\n## How to use\nUnder test_leaker directory, `test_leaker.c` file is present. This file is having a memory leak and a condition check with a variable which is not initialized before.
\nWhen run with valgrind, the valgrind report should highlight these two things.\n```c\n#include\n#include\n\nint main(){\n int *memory_allocation_var = malloc(1000); // Leaked memory which is never freed\n int conditional_jump_variable_without_initialize;\n if (conditional_jump_variable_without_initialize > 0){ // Variable used without initialization\n printf(\"Variable not initialized still using here \\n\");\n }\n return 0;\n}\n```\n\n### Compile C file\nTo compile c file on Linux environment, one must use `gcc` with `-g` option which enables debug symbols from the binary.\n```bash\ngcc -g test_leaker.c -o test_leaker\n```\nPost successful compilation, install valgrind from its official source mentioned at [valgrind_website](http://valgrind.org/) and execute with our `test_leaker` binary.\n```bash\nvalgrind -v --leak-check=full --show-reachable=yes --log-file=valgrind_log.txt ./test_leaker\n```\nThis will dump the valgrind logs in `valgrind_log.txt`\n\n### Using `valgrind_log_parser.py`\nThe `--help` argument can help to understand how to use this parser.\n```bash\npython valgrind_log_parser.py --help\nusage: valgrind_log_parser.py [-h] --valgrind_file VALGRIND_FILE\n\noptional arguments:\n -h, --help show this help message and exit\n --valgrind_file VALGRIND_FILE\n Provide the path of the valgrind file. Files must be\n of .txt format\n```\nProvide `valgrind_log.txt` file in argument to `valgrind_log_parser.py` and it will create a HTML report out of it in the same directory.\n```bash\npython valgrind_log_parser.py --valgrind_file \n```\nFollowing table will be generated with the above run.\n\"Valgrind\n\n\n", "description_content_type": "text/markdown", "docs_url": null, "download_url": "", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/siddheshsathe/Valgrind-Log-Parser", "keywords": "", "license": "GNU General Public License v3.0", "maintainer": "", "maintainer_email": "", "name": "valgrind-parser", "package_url": "https://pypi.org/project/valgrind-parser/", "platform": "", "project_url": "https://pypi.org/project/valgrind-parser/", "project_urls": { "Homepage": "https://github.com/siddheshsathe/Valgrind-Log-Parser" }, "release_url": "https://pypi.org/project/valgrind-parser/2.0.3/", "requires_dist": [ "json2table" ], "requires_python": "", "summary": "The valgrind logs parser. Creates the html report from txt logs.", "version": "2.0.3" }, "last_serial": 5824877, "releases": { "2.0.2": [ { "comment_text": "", "digests": { "md5": "4c79270edf15517349a62035e5580cdd", "sha256": "2ed363ec6b5ce49d9520c49da94268dab329e3f1ab440e13e8b3be17f1f309a9" }, "downloads": -1, "filename": "valgrind_parser-2.0.2-py2-none-any.whl", "has_sig": false, "md5_digest": "4c79270edf15517349a62035e5580cdd", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7515, "upload_time": "2019-09-13T09:54:15", "url": "https://files.pythonhosted.org/packages/1a/b1/3d597bf120b60c736a89eb32f32aa9db08b3fcb52331351a0bd124d6a15f/valgrind_parser-2.0.2-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "9ad721f8b6d1bfb4ef9bca3ec2a61f46", "sha256": "361af5c5492fa0d84c73835d0da7f436595df5e1520c8e57ad65d7e8d91805a1" }, "downloads": -1, "filename": "valgrind_parser-2.0.2.tar.gz", "has_sig": false, "md5_digest": "9ad721f8b6d1bfb4ef9bca3ec2a61f46", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5302, "upload_time": "2019-09-13T09:54:17", "url": "https://files.pythonhosted.org/packages/0f/fe/6d5a52eab39d0d77242e30e384f6cf45f825e1cc22ecc7c8a3cdde5888e6/valgrind_parser-2.0.2.tar.gz" } ], "2.0.3": [ { "comment_text": "", "digests": { "md5": "492e7e9bb6e57e8d280fb9040d90b507", "sha256": "a5b0b158b76f2691e9afe5a2141a3d359437bcec5386e40e4d3b4bf5a0967a42" }, "downloads": -1, "filename": "valgrind_parser-2.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "492e7e9bb6e57e8d280fb9040d90b507", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7877, "upload_time": "2019-09-13T10:28:59", "url": "https://files.pythonhosted.org/packages/fe/71/dabfca9315cb2381ec13ec08d90433ca3c321fe4fa2ff52d6c1b067da954/valgrind_parser-2.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "970e87ddaaa6e76dd3dda375456be7ce", "sha256": "ce06855da2eb06d5395f86307998299e7864a901bf6a7ebb958c4c9590fbec83" }, "downloads": -1, "filename": "valgrind_parser-2.0.3.tar.gz", "has_sig": false, "md5_digest": "970e87ddaaa6e76dd3dda375456be7ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5182, "upload_time": "2019-09-13T10:29:01", "url": "https://files.pythonhosted.org/packages/5d/bb/137cbade5244b8db8facb2c037fd5710ad30bbaafe2ea53a73909f494527/valgrind_parser-2.0.3.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "492e7e9bb6e57e8d280fb9040d90b507", "sha256": "a5b0b158b76f2691e9afe5a2141a3d359437bcec5386e40e4d3b4bf5a0967a42" }, "downloads": -1, "filename": "valgrind_parser-2.0.3-py2-none-any.whl", "has_sig": false, "md5_digest": "492e7e9bb6e57e8d280fb9040d90b507", "packagetype": "bdist_wheel", "python_version": "py2", "requires_python": null, "size": 7877, "upload_time": "2019-09-13T10:28:59", "url": "https://files.pythonhosted.org/packages/fe/71/dabfca9315cb2381ec13ec08d90433ca3c321fe4fa2ff52d6c1b067da954/valgrind_parser-2.0.3-py2-none-any.whl" }, { "comment_text": "", "digests": { "md5": "970e87ddaaa6e76dd3dda375456be7ce", "sha256": "ce06855da2eb06d5395f86307998299e7864a901bf6a7ebb958c4c9590fbec83" }, "downloads": -1, "filename": "valgrind_parser-2.0.3.tar.gz", "has_sig": false, "md5_digest": "970e87ddaaa6e76dd3dda375456be7ce", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 5182, "upload_time": "2019-09-13T10:29:01", "url": "https://files.pythonhosted.org/packages/5d/bb/137cbade5244b8db8facb2c037fd5710ad30bbaafe2ea53a73909f494527/valgrind_parser-2.0.3.tar.gz" } ] }