Advertisement

Tree-Traversal Orientation Analysis

  • Kevin Andrusky
  • Stephen Curial
  • José Nelson Amaral
Part of the Lecture Notes in Computer Science book series (LNCS, volume 4382)

Abstract

This paper presents a profiling-based analysis to determine the traversal orientation of link-based tree data structures. Given the very-high memory-hierarchy latencies in modern computers, once the compiler has identified that a pointer-based data structure represents a tree, it would be useful to determine the predominant orientation of traversal for the tree. Optimizing compilers can implement the static shape analysis proposed by Ghiya and Hendren to determine if a linked data structure is a tree [10]. However no techniques have been reported to enable an optimizing compiler to determine the predominant traversal orientation of a tree. This paper describes an analysis that collects data during an instrumented run to determine if the traversal is predominantly breadth-first or depth-first. The analysis determined, with high accuracy, the predominant orientation of traversal of trees in programs written by us as well as in the Olden benchmark suite. This profile-based analysis is storage efficient — it uses only 7% additional memory in comparison with the non-instrumented version of the code. Determining the predominant orientation of traversal of a tree data structure will enable several client optimizations such as improved software-based prefetching, data-storage remapping and better memory allocators.

Keywords

Memory Access Orientation Score Cache Line Open List Tree Data Structure 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. 1.
    Ailamaki, A., et al.: DBMSs on a modern processor: Where does time go? In: 25th Very Large Data Base (VLDB) Conference, Edinburgh, Scotland (1999)Google Scholar
  2. 2.
    Cahoon, B., McKinley, K.S.: Data flow analysis for software prefetching linked data structures in Java. In: 10th International Conference on Parallel Architectures and Compilation Techniques (PACT ’01), pp. 280–291. IEEE Computer Society Press, Los Alamitos (2001)CrossRefGoogle Scholar
  3. 3.
    Calder, B., et al.: Cache-conscious data placement. In: Proceedings of the Eighth International Conference on Architectural Support for Programming Languages and Operating Systems (ASPLOS-VIII), San Jose (1998)Google Scholar
  4. 4.
    Carlisle, M., Rogers, A.: Olden web page. http://www.cs.princeton.edu/~mcc/olden.html
  5. 5.
    Chan, S., et al.: Web page: Open research compiler - aurora. http://sourceforge.net/projects/ipf-orc
  6. 6.
    Chilimbi, T.M., Davidson, B., Larus, J.R.: Cache-conscious structure definition. In: PLDI ’99: Proceedings of the ACM SIGPLAN 1999 conference on Programming Language Design and Implementation, Atlanta, Georgia, United States, pp. 13–24. ACM Press, New York (1999)CrossRefGoogle Scholar
  7. 7.
    Chilimbi, T.M., Hill, M.D., Larus, J.R.: Cache-conscious structure layout. In: PLDI ’99: Proceedings of the ACM SIGPLAN 1999 conference on Programming Language Design and Implementation, Atlanta, Georgia, United States, pp. 1–12. ACM Press, New York (1999)CrossRefGoogle Scholar
  8. 8.
    Chilimbi, T.M., Hirzel, M.: Dynamic hot data stream prefetching for general-purpose programs. In: PLDI ’02: Proceedings of the ACM SIGPLAN 2002 conference on Programming Language Design and Implementation, Berlin, Germany, pp. 199–209. ACM Press, New York (2002)CrossRefGoogle Scholar
  9. 9.
    Choi, S., et al.: A general framework for prefetch scheduling in linked data structures and its application to multi-chain prefetching. ACM Transactions on Computer Systems 22(2), 214–280 (2004)CrossRefGoogle Scholar
  10. 10.
    Ghiya, R., Hendren, L.J.: Is it a tree, a DAG, or a cyclic graph? A shape analysis for heap-directed pointers in C. In: Symposium on Principles of Programming Languages (POPL), St. Petersburg, Florida, January, pp. 1–15 (1996)Google Scholar
  11. 11.
    Ghoting, A., et al.: Cache-conscious frequent pattern mining on a modern processor. In: VLDB ’05: Proceedings of the 31st international conference on Very large data bases, Trondheim, Norway, pp. 577–588. VLDB Endowment (2005)Google Scholar
  12. 12.
    Itzkowitz, M., et al.: Memory profiling using hardware counters. In: SC ’03: Proceedings of the 2003 ACM/IEEE conference on Supercomputing, IEEE Computer Society Press, Los Alamitos (2003)Google Scholar
  13. 13.
    Lattner, C., Adve, V.: Automatic pool allocation: Improving performance by controlling data structure layout in the heap. In: PLDI ’05: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation, Chicago, IL, USA, pp. 129–142. ACM Press, New York (2005)CrossRefGoogle Scholar
  14. 14.
    Luk, C.K., Mowry, T.C.: Compiler-based prefetching for recursive data structures. In: ACM SIGOPS Operating Systems Review, ACM Press, New York (1996)Google Scholar
  15. 15.
    Luk, C.K.: Web resource: Uniprocessor olden tarball. http://www.cs.cmu.edu/~luk/software/olden_SGI.tar.gz
  16. 16.
    Niewiadomski, R., Amaral, J.N., Holte, R.C.: A performance study of data layout techniques for improving data locality in refinement-based pathfinding. ACM Journal of Experimental Algorithmics 9(1.4), 1–28 (2004)MathSciNetGoogle Scholar
  17. 17.
    Petrank, E., Rawitz, D.: The hardness of cache conscious data placement. In: POPL ’02: Proceedings of the 29th ACM SIGPLAN-SIGACT symposium on Principles of programming languages, Portland, Oregon, Jan. 2002, pp. 101–112. ACM Press, New York (2002)CrossRefGoogle Scholar
  18. 18.
    Rao, J., Ross, K.A.: Making B+ Trees cache conscious in main memory. In: SIGMOD ’00: Proceedings of the 2000 ACM SIGMOD International Conference on Management of Data, Dallas, Texas, United States, pp. 475–486. ACM Press, New York (2000)CrossRefGoogle Scholar
  19. 19.
    Truong, D.N., Bodin, F., Seznec, A.: Improving cache behavior of dynamically allocated data structures. In: Seventh International Conference on Parallel Architectures and Compilation Techniques (PACT’98), pp. 322–329 (1998)Google Scholar
  20. 20.
    Zhao, P., et al.: Forma: A framework for safe automatic array reshaping. ACM Transactions on Programming Languages and Systems (To Appear)Google Scholar

Copyright information

© Springer Berlin Heidelberg 2007

Authors and Affiliations

  • Kevin Andrusky
    • 1
  • Stephen Curial
    • 1
  • José Nelson Amaral
    • 1
  1. 1.Department of Computing Science, University of Alberta, Edmonton, AlbertaCanada

Personalised recommendations