Skip to content

Instrumentation of for loops with control flow logger #15

@bestchai

Description

@bestchai

#Overview

All for loops should be instrumented with calls to the control flow logger. Before entering a for loop a call to logger.setFalse("forID") should be called. Upon entering the loop a call to logger.setTrue("forID") should be called.

During the code injection phase of instrumentation, only variables collected by data flow from true marked for loops should be logged.

#Example

This example takes place in a file named source.go in the package main

#Pre Instrumentation

#!go

0  for ( iterator ; conditional ; incrementer ) {
1        preformWork()
2  }

#Post Instrumentation

#!go
0 instrumenter.Cflogger.setFalse("main_source_for_L0")
1 for (iterator ; conditional ; incrementor ) {
2   instrumenter.Cflogger.setTrue("main_source_for_L0")
3   preformWork()
4 }

[Issue created by wantonsolutions: 2015-08-21]

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions