More than Just UML! • UML is about static structure of software • In terms of abstractions like Software Visualization – Procedures – Objects – Files Presented by Sam Davis – Packages • But… 2 3 4 Software is Dynamic! Test Results Detailed Execution Data • Abstractions are for developers • Hundreds, maybe thousands of tests • Could be for many executions • Users care about behaviour • For each test: • Dynamic events as opposed to summary What can we visualize? data – Purpose • Visualize behaviour of software at run time – Result (pass or fail) – Find errors • Could be per-configuration or per-version – Find performance bottlenecks – Relevant parts of the code 5 7 8 Summary Data: Examples Dynamic Events: Examples Really Detailed Execution Data • Memory allocation • Total running time • Logging virtual machines can capture everything Strata_Various: Multi_Layer • System calls – Enough data to replay program execution and • Number of times a method was called Visualization of Dynamics in recreate the entire machine state at any point in time • Cache misses • Amount of time CPU was idle Software System Behavior – Allows “time-traveling” • Page faults – For long running systems, data could span months • Pipeline flushes • Uses: Doug Kimelman, Bryan Rosenburg, Tova • Process scheduling Roth – Debugging • Completion of disk reads or writes Proc. Fifth IEEE Conf. Visualization ’94, IEEE – Understanding attacks Computer Society Press, Los Alamitos, Calif., • Message receipt 1994, pp. 172–178. • Application phases 9 10 11 Strata_Various Strata_Various: Main Argument • Trace-driven program visualization • Debugging and tuning requires simultaneously analyzing behaviour at • Trace: sequence of <time, event> pairs multiple layers of the system • Events captured from all layers: – Hardware – Operating System – Application • Replay execution history • Coordinate navigation of event views 13 14 15 16
Strata_Various: Critique SeeSoft SeeSoft Example • Examples demonstrate usefulness • Zoomed out view of source code • Fundamentally, a good idea – Lines of code displayed as thin horizontal lines – Increasing importance as multi-core machines become standard – Preserve indentation, length • Many windows – Can colour lines according to data – Titles not meaningful • Link with readable view of code – Virtual reality cop-out • Allows tying data to source code • Dubious claim that tracing does not alter behaviour Stephen G. Eick, Joseph L. Steffen and Eric E. Sumner, Jr. “SeeSoft – A Tool for Visualizing Line-Oriented Software Statistics.” IEEE Transactions on 17 18 19 20 Software Engineering , 18(11):957-968, November 1992. Tarantula Tarantula Tarantula: Discrete Colour Mapping • Extends SeeSoft idea • Input: • Based on user tests Visually Encoding • Defines colour mapping for LOC based on – For each test: • Black background Program Test Information to Find • Test number test results • Colour each line Faults in Software • Result (pass or fail) • Goal: use test results to identify broken – Red if executed by failed tests (Tarantula) • Test coverage (list of line numbers) code – Green if executed by passed tests James Eagan, Mary Jen Harrold, James A. Jones, and John Stasko, Proc. InfoVis 2001 – Yellow if executed by both pp. 33-36. 22 23 24 Tarantula: Continuous Colour Tarantula: Continuous Colour Mapping Mapping • Extend discrete colour mapping by • For each line L – Interpolating between red and green – Let p and f be the percentages of passed and failed tests that executed L – Adjusting brightness according to number of tests – If p = f = 0, colour L grey – Else, colour L according to • Possibilities: • Hue: p / ( p + f ), where 0 is red and 1 is green – Number of passed or failed tests • Brightness: max( p, f ) – Ratio of passed to failed tests – Ratio of % passed to % failed 25 26 27 28 Tarantula: Critique Gammatella Gammatella: Executions • Visualizing test results could be useful, • Collection and storage of program- • Code coverage and profiling data Visualization of Program- this is a first step execution data • Execution properties Execution Data for Deployed • Future work: does colouring help to find • Visualization of data about many – OS Software broken code? executions – Java version • Colouring: simple idea made complex (Gammatella) – Etc. • Tests identified only by number Alessandro Orso, James Jones, and Mary Jean Harrold. • Filters – Better: name tests Proc. of the ACM Symp. on Software – Boolean predicate logic Visualization, San Diego, CA, June 2003, – Better still: can we visualize the meaning of pages 67--76. tests? • Summarizers 29 31 32
Gammatella: Coloured, Tri-Level One Level Treemap Representation • System level • Layout algorithm for treemap of depth 1 – Treemap of package/class hierarchy – Preserves relative placement of colours • File level: – SeeSoft-like view of code • Statement level: – Source code (coloured text) • Colours based on exceptions – Other colourings possible, e.g. profiling data 33 34 35 36 Superscalar Processors: Quick Gammatella: Critique Overview • Complete system – not just a visualization • Pipeline • Effectively links code to structure • Multiple Functional Units Visualizing Application Behavior – Instruction-Level Parallelism (ILP) • Trial usage discovered useful but high- on Superscalar Processors level information • Instruction Reordering – Mainly relied on system view • Branch Prediction and Speculation Chris Stolte, Robert Bosch, Pat – Would be nice to see examples using file and • Reorder Buffer Hanrahan, and Mendel Rosenblum statement level views Proc. InfoVis 1999 – Instructions wait to graduate (exit pipeline) 37 39 40 41 42 43 44 Critique • Most code doesn’t need this level of optimization, but – The visualization is effective, and would be useful for code that does – May reduce the expertise needed to perform low level optimzation • Might be effective as a teaching tool • Bad color scheme: black/purple/brown • Does it scale with processor complexity? 45 46 47 48
Papers Papers • D. Kimelman, B. Rosenburg, and T. Roth, “Strata-Various: Multi-Layer Visualization of • Alessandro Orso, James Jones, and Mary Jean Harrold. "Visualization of Program-Execution Dynamics in Software System Behavior,” Proc. Data for Deployed Software." Proc. of the ACM Fifth IEEE Conf. Visualization ’94, IEEE Symp. on Software Visualization, San Diego, CA, Computer Society Press, Los Alamitos, Calif., June 2003, pages 67--76. 1994, pp. 172–178. • Chris Stolte, Robert Bosch, Pat Hanrahan, and • James Eagan, Mary Jen Harrold, James A. Mendel Rosenblum, "Visualizing Application Jones, and John Stasko, "Visually Encoding Behavior on Superscalar Processors." Proc. Program Test Information to Find Faults in InfoVis 1999 Software." Proc. InfoVis 2001 pp. 33-36. 49 50
Recommend
More recommend