160 likes | 253 Views
By 林泽燕. Program trace A program trace lists the addresses of instructions executed and data referenced during a program‘s execution by injecting code.
E N D
Program trace • A program tracelists the addresses of instructions executed and data referenced during a program‘s execution by injecting code. • Application areas: program comprehension, debugging, bug reproduction, test case generation, fault localization, verification, and fault repair. • Problem: run-time overhead during the execution
Solution • A framework for distributed trace collection • a witness set->a profile->execute once->a partial path • The first approach for parallel trace collection
Realizable distributed trace collection (a diamond has more than two distinct edges and contains exactly one fork and one join.)
Effective parallel distribution • The time for parallel trace collection depends on the maximum time taken by any machine. • the cost of a profile->the cost to cover the diamonds->the number of witness hits by the actual run->the total weight of the witnesses
Important findings • For effective time for collection, each machine contains only a single profile if the size of profile is unbounded. • Combining multiple diamonds in the same profile can reduce the total witness weights to cover the diamonds. • Fine grained weight distribution facilitates even distribution of total weights across machines. {{b3,b4},{b6,b7}} VS {{b3,b4,b6}} 6 units with weights 1,2,3,4,5,6 {{1},{2},{3},{4},{5},{6}} VS {{1}, {2, 3}, {4, 5, 6}}
3 distribution strategies • Fine-grained distribution strategy: forms each job as a single diamond or cycle-without-diamond • Function-wise grouping strategy: forms each job by combining all diamonds and directed-cycles-without-diamond of a single function • Optimized-grouping strategy: uses heuristics to find potentially witness-optimizablediamonds and forms jobs by combining only such diamonds.
The overall algorithm for profile distribution • A spanning tree of a connected graph G can be defined as a maximal set of edges of G that contains no cycle, or as a minimal set of edges that connect all vertices.
Experimental results 1.Cost of collection vs. Machine • using 6 machines the trace collection time reduces to less than 1/3.
Experimental results 2.Comparison of distribution strategies • Optimized strategy is always better than the function-wise grouping strategy • For benchmarks with less number of functions show better results with fine grained distribution strategy • Grouping strategies are more effective in reducing weights of profiles when multiple diamonds are in cycles. Absence of the cycles makes fine-grained strategy more effective than the two grouping strategies
Experimental results 3.Effect of bounded profile size • with increase in limit, in most cases the cost decrease, with an exception in few cases. • Exception: In these cases the diamonds in each CFG are not witness-optimizable, thus combining them increases the profile size and cost.