# Some thoughts about code-coverage measurement with Pin

DevFeed: [Some thoughts about code-coverage measurement with Pin](<https://devfeed.tech/articles/some-thoughts-about-code-coverage-measurement-with-pin-39689.md>)

Original publisher: [Read original article](<https://doar-e.github.io/blog/2013/08/31/some-thoughts-about-code-coverage-measurement-with-pin/>)

Author: Axel "0vercl0k" Souchet

Published: 2013-09-01T01:57:00Z

Content type: tutorial

Language: en

Sources: [Diary of a reverse-engineer](<https://devfeed.tech/sources/diary-of-a-reverse-engineer.md>)

Topics: [test-coverage](<https://devfeed.tech/topics/test-coverage.md>), [Reverse Engineering](<https://devfeed.tech/topics/reverse-engineering.md>), [Code](<https://devfeed.tech/topics/code.md>), [Fuzzing/Fuzz testing](<https://devfeed.tech/topics/fuzzing.md>), [JSON](<https://devfeed.tech/topics/json.md>), [intel](<https://devfeed.tech/topics/intel.md>), [Windows](<https://devfeed.tech/topics/windows.md>), [x86](<https://devfeed.tech/topics/x86.md>)

Tags: [code](<https://devfeed.tech/tags/code.md>), [code-coverage](<https://devfeed.tech/tags/code-coverage.md>), [dynamic-binary-instrumentation](<https://devfeed.tech/tags/dynamic-binary-instrumentation.md>), [fuzzing](<https://devfeed.tech/tags/fuzzing.md>), [intel](<https://devfeed.tech/tags/intel.md>), [json](<https://devfeed.tech/tags/json.md>), [misc](<https://devfeed.tech/tags/misc.md>), [reverse-engineering](<https://devfeed.tech/tags/reverse-engineering.md>)

## AI overview

This tutorial explains how to build an Intel Pin tool for comparing code coverage across executions of reverse-engineered binaries. The proposed tool records executed basic blocks and instruction counts, then produces JSON reports that can be analyzed with Python scripts.

## Source excerpt

Introduction Sometimes, when you are reverse-engineering binaries you need somehow to measure, or just to have an idea about how much "that" execution is covering the code of your target. It can be for fuzzing purpose, maybe you have a huge set of inputs (it can be files, network traffic ...