Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instrumentation of for loops with control flow logger #15

Open
bestchai opened this issue May 26, 2020 · 0 comments
Open

Instrumentation of for loops with control flow logger #15

bestchai opened this issue May 26, 2020 · 0 comments
Labels
enhancement New feature or request

Comments

@bestchai
Copy link
Member

bestchai commented May 26, 2020

#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]

@bestchai bestchai added the enhancement New feature or request label May 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant