codegreen 0.2.2__tar.gz → 0.3.1__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. codegreen-0.3.1/CMakeLists.txt +113 -0
  2. {codegreen-0.2.2/codegreen.egg-info → codegreen-0.3.1}/PKG-INFO +28 -11
  3. {codegreen-0.2.2 → codegreen-0.3.1}/README.md +25 -10
  4. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/__init__.py +1 -1
  5. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/cli/cli.py +238 -59
  6. {codegreen-0.2.2 → codegreen-0.3.1/codegreen.egg-info}/PKG-INFO +28 -11
  7. {codegreen-0.2.2 → codegreen-0.3.1}/pyproject.toml +5 -1
  8. {codegreen-0.2.2 → codegreen-0.3.1}/setup.py +5 -0
  9. codegreen-0.2.2/CMakeLists.txt +0 -326
  10. {codegreen-0.2.2 → codegreen-0.3.1}/LICENSE +0 -0
  11. {codegreen-0.2.2 → codegreen-0.3.1}/MANIFEST.in +0 -0
  12. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/__init__.py +0 -0
  13. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/__main__.py +0 -0
  14. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/compilers.py +0 -0
  15. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/config.py +0 -0
  16. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/harness.py +0 -0
  17. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/profilers.py +0 -0
  18. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/results.py +0 -0
  19. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/suites/__init__.py +0 -0
  20. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/suites/base.py +0 -0
  21. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/suites/benchmarksgame.py +0 -0
  22. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/suites/perfopt.py +0 -0
  23. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/validation/__init__.py +0 -0
  24. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/validation/analysis.py +0 -0
  25. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/validation/experiments.py +0 -0
  26. {codegreen-0.2.2 → codegreen-0.3.1}/benchmark/validation/reporting.py +0 -0
  27. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analysis/__init__.py +0 -0
  28. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analysis/_ts_java.py +0 -0
  29. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analysis/cfg/__init__.py +0 -0
  30. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analysis/cfg/builder.py +0 -0
  31. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analysis/cfg/callgraph.py +0 -0
  32. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analysis/cfg/dataflow.py +0 -0
  33. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analysis/cfg/energy_flow.py +0 -0
  34. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analysis/cfg/features.py +0 -0
  35. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analysis/cfg/pdg.py +0 -0
  36. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analysis/cfg/types.py +0 -0
  37. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analysis/cfg/visualization.py +0 -0
  38. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analyzer/__init__.py +0 -0
  39. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/analyzer/plot.py +0 -0
  40. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/cli/__init__.py +0 -0
  41. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/cli/entrypoint.py +0 -0
  42. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/config.json +0 -0
  43. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/__init__.py +0 -0
  44. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/ast_processor.py +0 -0
  45. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/bridge_analyze.py +0 -0
  46. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/bridge_instrument.py +0 -0
  47. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/config.py +0 -0
  48. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/configs/TEMPLATE.json +0 -0
  49. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/configs/c.json +0 -0
  50. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/configs/cpp.json +0 -0
  51. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/configs/java.json +0 -0
  52. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/configs/javascript.json +0 -0
  53. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/configs/python.json +0 -0
  54. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/engine.py +0 -0
  55. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/language_configs.py +0 -0
  56. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/language_engine.py +0 -0
  57. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/language_runtimes/c/codegreen_runtime.h +0 -0
  58. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/language_runtimes/cpp/codegreen/runtime.hpp +0 -0
  59. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/language_runtimes/java/codegreen/runtime/CodeGreenRuntime.java +0 -0
  60. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/language_runtimes/java/codegreen/runtime/CodeGreenStandaloneRuntime.java +0 -0
  61. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/instrumentation/language_runtimes/python/codegreen_runtime.py +0 -0
  62. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/utils/__init__.py +0 -0
  63. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/utils/binary.py +0 -0
  64. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen/utils/platform.py +0 -0
  65. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen.egg-info/SOURCES.txt +0 -0
  66. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen.egg-info/dependency_links.txt +0 -0
  67. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen.egg-info/entry_points.txt +0 -0
  68. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen.egg-info/not-zip-safe +0 -0
  69. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen.egg-info/requires.txt +0 -0
  70. {codegreen-0.2.2 → codegreen-0.3.1}/codegreen.egg-info/top_level.txt +0 -0
  71. {codegreen-0.2.2 → codegreen-0.3.1}/requirements.txt +0 -0
  72. {codegreen-0.2.2 → codegreen-0.3.1}/setup.cfg +0 -0
  73. {codegreen-0.2.2 → codegreen-0.3.1}/tests/test_instrumentation.py +0 -0
  74. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/binarytrees/2.c +0 -0
  75. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/helloworld/1.c +0 -0
  76. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/knucleotide/1.c +0 -0
  77. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/mandelbrot/1-ffi.c +0 -0
  78. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/mandelbrot/1-mffi.c +0 -0
  79. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/nbody/2.c +0 -0
  80. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/nbody/5.c +0 -0
  81. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/nbody/8-i.c +0 -0
  82. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/nsieve/1.c +0 -0
  83. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/spectral-norm/3.c +0 -0
  84. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/spectral-norm/4.c +0 -0
  85. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/spectral-norm/5-im.c +0 -0
  86. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/Programming-Language-Benchmarks/bench/algorithm/spectral-norm/6-im.c +0 -0
  87. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/aligned_indent.c +0 -0
  88. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/array.c +0 -0
  89. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/comment.c +0 -0
  90. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/compound_lit.c +0 -0
  91. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/cond.c +0 -0
  92. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/enum.c +0 -0
  93. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/expr.c +0 -0
  94. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/func.c +0 -0
  95. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/if_else.c +0 -0
  96. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/issue-1568.c +0 -0
  97. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/issue-2086.c +0 -0
  98. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/issue-4079.c +0 -0
  99. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/issue-4117.c +0 -0
  100. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/issue-4525.c +0 -0
  101. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/label.c +0 -0
  102. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/loop.c +0 -0
  103. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/no_braces.c +0 -0
  104. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/preproc_cond.c +0 -0
  105. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/preproc_func.c +0 -0
  106. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/string.c +0 -0
  107. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/struct.c +0 -0
  108. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/switch.c +0 -0
  109. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/ternary.c +0 -0
  110. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/indent/c/unfinished_comment.c +0 -0
  111. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/nvim-treesitter/tests/query/highlights/c/enums-as-constants.c +0 -0
  112. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/crates/cli/src/templates/PARSER_NAME.h +0 -0
  113. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/crates/cli/src/templates/py-binding.c +0 -0
  114. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/crates/generate/src/templates/alloc.h +0 -0
  115. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/crates/generate/src/templates/array.h +0 -0
  116. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/crates/highlight/include/tree_sitter/highlight.h +0 -0
  117. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/crates/tags/include/tree_sitter/tags.h +0 -0
  118. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/CMakeLists.txt +0 -0
  119. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/binding_web/lib/tree-sitter.c +0 -0
  120. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/include/tree_sitter/api.h +0 -0
  121. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/alloc.c +0 -0
  122. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/alloc.h +0 -0
  123. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/array.h +0 -0
  124. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/atomic.h +0 -0
  125. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/clock.h +0 -0
  126. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/error_costs.h +0 -0
  127. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/get_changed_ranges.c +0 -0
  128. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/get_changed_ranges.h +0 -0
  129. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/host.h +0 -0
  130. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/language.c +0 -0
  131. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/language.h +0 -0
  132. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/length.h +0 -0
  133. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/lexer.c +0 -0
  134. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/lexer.h +0 -0
  135. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/lib.c +0 -0
  136. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/node.c +0 -0
  137. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/parser.c +0 -0
  138. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/parser.h +0 -0
  139. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/point.h +0 -0
  140. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/portable/endian.h +0 -0
  141. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/query.c +0 -0
  142. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/reduce_action.h +0 -0
  143. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/reusable_node.h +0 -0
  144. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/stack.c +0 -0
  145. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/stack.h +0 -0
  146. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/subtree.c +0 -0
  147. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/subtree.h +0 -0
  148. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/tree.c +0 -0
  149. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/tree.h +0 -0
  150. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/tree_cursor.c +0 -0
  151. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/tree_cursor.h +0 -0
  152. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/ts_assert.h +0 -0
  153. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/unicode/ptypes.h +0 -0
  154. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/unicode/umachine.h +0 -0
  155. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/unicode/urename.h +0 -0
  156. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/unicode/utf.h +0 -0
  157. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/unicode/utf16.h +0 -0
  158. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/unicode/utf8.h +0 -0
  159. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/unicode.h +0 -0
  160. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/wasm/stdlib.c +0 -0
  161. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/wasm/wasm-stdlib.h +0 -0
  162. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/wasm_store.c +0 -0
  163. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/lib/src/wasm_store.h +0 -0
  164. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/test/fixtures/test_grammars/depends_on_column/scanner.c +0 -0
  165. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/test/fixtures/test_grammars/epsilon_external_extra_tokens/scanner.c +0 -0
  166. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/test/fixtures/test_grammars/epsilon_external_tokens/scanner.c +0 -0
  167. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/test/fixtures/test_grammars/external_and_internal_anonymous_tokens/scanner.c +0 -0
  168. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/test/fixtures/test_grammars/external_and_internal_tokens/scanner.c +0 -0
  169. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/test/fixtures/test_grammars/external_extra_tokens/scanner.c +0 -0
  170. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/test/fixtures/test_grammars/external_tokens/scanner.c +0 -0
  171. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/test/fixtures/test_grammars/external_unicode_column_alignment/scanner.c +0 -0
  172. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/test/fixtures/test_grammars/get_col_eof/scanner.c +0 -0
  173. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/test/fixtures/test_grammars/get_col_should_hang_not_crash/scanner.c +0 -0
  174. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/test/fixtures/test_grammars/inverted_external_token/scanner.c +0 -0
  175. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter/test/fixtures/test_grammars/uses_current_column/scanner.c +0 -0
  176. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/CMakeLists.txt +0 -0
  177. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/bindings/c/tree_sitter/tree-sitter-c.h +0 -0
  178. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/bindings/python/tree_sitter_c/binding.c +0 -0
  179. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/bindings/swift/TreeSitterC/c.h +0 -0
  180. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/examples/cluster.c +0 -0
  181. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/examples/malloc.c +0 -0
  182. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/examples/parser.c +0 -0
  183. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/src/parser.c +0 -0
  184. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/src/tree_sitter/alloc.h +0 -0
  185. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/src/tree_sitter/array.h +0 -0
  186. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/src/tree_sitter/parser.h +0 -0
  187. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/test/highlight/keywords.c +0 -0
  188. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-c/test/highlight/names.c +0 -0
  189. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-cpp/CMakeLists.txt +0 -0
  190. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-cpp/bindings/c/tree-sitter-cpp.h +0 -0
  191. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-cpp/bindings/python/tree_sitter_cpp/binding.c +0 -0
  192. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-cpp/bindings/swift/TreeSitterCPP/cpp.h +0 -0
  193. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-cpp/examples/marker-index.h +0 -0
  194. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-cpp/src/parser.c +0 -0
  195. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-cpp/src/scanner.c +0 -0
  196. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-cpp/src/tree_sitter/alloc.h +0 -0
  197. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-cpp/src/tree_sitter/array.h +0 -0
  198. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-cpp/src/tree_sitter/parser.h +0 -0
  199. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-java/CMakeLists.txt +0 -0
  200. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-java/bindings/c/tree-sitter-java.h +0 -0
  201. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-java/bindings/python/tree_sitter_java/binding.c +0 -0
  202. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-java/bindings/swift/TreeSitterJava/java.h +0 -0
  203. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-java/src/parser.c +0 -0
  204. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-java/src/tree_sitter/alloc.h +0 -0
  205. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-java/src/tree_sitter/array.h +0 -0
  206. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-java/src/tree_sitter/parser.h +0 -0
  207. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-python/CMakeLists.txt +0 -0
  208. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-python/bindings/c/tree-sitter-python.h +0 -0
  209. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-python/bindings/python/tree_sitter_python/binding.c +0 -0
  210. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-python/bindings/swift/TreeSitterPython/python.h +0 -0
  211. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-python/src/parser.c +0 -0
  212. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-python/src/scanner.c +0 -0
  213. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-python/src/tree_sitter/alloc.h +0 -0
  214. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-python/src/tree_sitter/array.h +0 -0
  215. {codegreen-0.2.2 → codegreen-0.3.1}/third_party/tree-sitter-python/src/tree_sitter/parser.h +0 -0
@@ -0,0 +1,113 @@
1
+ cmake_minimum_required(VERSION 3.16)
2
+ project(CodeGreen VERSION 0.3.0 LANGUAGES CXX)
3
+
4
+ set(CMAKE_CXX_STANDARD 17)
5
+ set(CMAKE_CXX_STANDARD_REQUIRED ON)
6
+
7
+ if(NOT CMAKE_BUILD_TYPE)
8
+ set(CMAKE_BUILD_TYPE Release)
9
+ endif()
10
+
11
+ set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
12
+ set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
13
+ set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
14
+
15
+ find_package(PkgConfig)
16
+ find_package(Threads REQUIRED)
17
+
18
+ # Optional GPU library detection
19
+ find_library(NVML_LIBRARY nvidia-ml PATHS /usr/local/cuda/lib64 /usr/lib/x86_64-linux-gnu)
20
+ find_path(NVML_INCLUDE_DIR nvml.h PATHS /usr/local/cuda/include /usr/include/nvidia/gdk)
21
+ find_library(ROCM_SMI_LIBRARY rocm_smi64 PATHS /opt/rocm/lib)
22
+ find_path(ROCM_SMI_INCLUDE_DIR rocm_smi.h PATHS /opt/rocm/include/rocm_smi)
23
+
24
+ if(NVML_LIBRARY AND NVML_INCLUDE_DIR)
25
+ message(STATUS "NVML found: ${NVML_LIBRARY}")
26
+ set(HAVE_NVML ON)
27
+ else()
28
+ set(HAVE_NVML OFF)
29
+ endif()
30
+
31
+ if(ROCM_SMI_LIBRARY AND ROCM_SMI_INCLUDE_DIR)
32
+ message(STATUS "ROCm SMI found: ${ROCM_SMI_LIBRARY}")
33
+ set(HAVE_ROCM_SMI ON)
34
+ else()
35
+ set(HAVE_ROCM_SMI OFF)
36
+ endif()
37
+
38
+ # Global include directories
39
+ include_directories(${CMAKE_SOURCE_DIR}/codegreen/measurement/include)
40
+
41
+ # Tree-sitter (for C++ instrumentation runtime, if submodules present)
42
+ if(EXISTS "${CMAKE_SOURCE_DIR}/third_party/tree-sitter/lib/CMakeLists.txt")
43
+ include_directories(${CMAKE_SOURCE_DIR}/third_party/tree-sitter/lib/include)
44
+ add_subdirectory(third_party/tree-sitter/lib)
45
+ if(EXISTS "${CMAKE_SOURCE_DIR}/third_party/tree-sitter-python/CMakeLists.txt")
46
+ add_subdirectory(third_party/tree-sitter-python EXCLUDE_FROM_ALL)
47
+ endif()
48
+ endif()
49
+
50
+ # NEMB -- the only native component
51
+ add_subdirectory(codegreen/measurement)
52
+
53
+ # Sync instrumentation files to build dir (for C/C++/Java runtime headers)
54
+ file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/runtime)
55
+ file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/python/instrumentation)
56
+
57
+ add_custom_target(sync_instrumentation
58
+ COMMAND ${CMAKE_COMMAND} -E copy
59
+ ${CMAKE_SOURCE_DIR}/codegreen/instrumentation/language_runtimes/python/codegreen_runtime.py
60
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/runtime/codegreen_runtime.py
61
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
62
+ ${CMAKE_SOURCE_DIR}/codegreen/instrumentation/language_runtimes
63
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/python/instrumentation/language_runtimes
64
+ COMMAND ${CMAKE_COMMAND} -E copy_directory
65
+ ${CMAKE_SOURCE_DIR}/codegreen/instrumentation/configs
66
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/python/instrumentation/configs
67
+ COMMENT "Syncing instrumentation files to build directory"
68
+ )
69
+
70
+ add_dependencies(codegreen-nemb sync_instrumentation)
71
+
72
+ # Copy config to build dir
73
+ if(EXISTS "${CMAKE_SOURCE_DIR}/config/codegreen.json")
74
+ file(MAKE_DIRECTORY ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/config)
75
+ configure_file(
76
+ ${CMAKE_SOURCE_DIR}/config/codegreen.json
77
+ ${CMAKE_RUNTIME_OUTPUT_DIRECTORY}/config/codegreen.json
78
+ COPYONLY
79
+ )
80
+ endif()
81
+
82
+ # Dev-install: copy NEMB library to project root for pip editable installs
83
+ add_custom_target(dev-install ALL
84
+ DEPENDS codegreen-nemb
85
+ COMMAND ${CMAKE_COMMAND} -E make_directory ${CMAKE_SOURCE_DIR}/lib
86
+ COMMAND ${CMAKE_COMMAND} -E copy
87
+ ${CMAKE_BINARY_DIR}/lib/libcodegreen-nemb${CMAKE_SHARED_LIBRARY_SUFFIX}
88
+ ${CMAKE_SOURCE_DIR}/lib/
89
+ COMMENT "Dev-install: copying NEMB to ${CMAKE_SOURCE_DIR}/lib/"
90
+ )
91
+
92
+ # Install
93
+ install(TARGETS codegreen-nemb
94
+ LIBRARY DESTINATION lib
95
+ ARCHIVE DESTINATION lib
96
+ RUNTIME DESTINATION bin
97
+ )
98
+
99
+ install(FILES
100
+ ${CMAKE_SOURCE_DIR}/codegreen/instrumentation/language_runtimes/python/codegreen_runtime.py
101
+ DESTINATION bin/runtime
102
+ )
103
+
104
+ if(EXISTS "${CMAKE_SOURCE_DIR}/config/codegreen.json")
105
+ install(FILES ${CMAKE_SOURCE_DIR}/config/codegreen.json
106
+ DESTINATION bin/config
107
+ )
108
+ endif()
109
+
110
+ set(CPACK_PACKAGE_NAME "CodeGreen")
111
+ set(CPACK_PACKAGE_VERSION "${PROJECT_VERSION}")
112
+ set(CPACK_PACKAGE_DESCRIPTION_SUMMARY "Energy-aware software development tool")
113
+ include(CPack)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: codegreen
3
- Version: 0.2.2
3
+ Version: 0.3.1
4
4
  Summary: Energy-aware software development tool for measuring and optimizing code energy consumption
5
5
  Author-email: Saurabhsingh Rajput <saurabh@dal.ca>
6
6
  Maintainer-email: Saurabhsingh Rajput <saurabh@dal.ca>
@@ -399,6 +399,8 @@ Classifier: Programming Language :: Python :: 3.12
399
399
  Classifier: Programming Language :: Python :: 3.13
400
400
  Classifier: Programming Language :: C++
401
401
  Classifier: Operating System :: POSIX :: Linux
402
+ Classifier: Operating System :: MacOS :: MacOS X
403
+ Classifier: Operating System :: Microsoft :: Windows :: Windows 11
402
404
  Classifier: Environment :: Console
403
405
  Requires-Python: >=3.8
404
406
  Description-Content-Type: text/markdown
@@ -447,7 +449,7 @@ CodeGreen is a comprehensive tool for fine-grained energy profiling and optimiza
447
449
  pip install codegreen
448
450
  ```
449
451
 
450
- Requires Linux with RAPL support. The wheel includes the pre-built C++ measurement backend.
452
+ Pre-built wheels available for Linux x86_64 and macOS ARM64 (Apple Silicon). Includes the native NEMB energy measurement backend.
451
453
 
452
454
  ### From source (recommended for development)
453
455
 
@@ -456,18 +458,33 @@ git clone https://github.com/SMART-Dal/codegreen.git
456
458
  cd codegreen
457
459
  ./install.sh
458
460
 
459
- # For RAPL sensor access (one-time, requires sudo):
461
+ # Linux: RAPL sensor access (one-time, requires sudo):
460
462
  sudo ./install.sh # or: sudo codegreen init-sensors
461
- # Then log out and back in for group permissions
463
+
464
+ # macOS: energy measurement requires sudo (IOReport access):
465
+ sudo codegreen run -- python script.py
462
466
  ```
463
467
 
468
+ ### Platform support
469
+
470
+ | Platform | pip install | Energy measurement | Backend |
471
+ |----------|------------|-------------------|---------|
472
+ | Linux x86_64 (Intel) | Pre-built wheel | Full (PKG, core, iGPU, DRAM) | RAPL via NEMB |
473
+ | Linux x86_64 (AMD) | Pre-built wheel | Full (PKG, no DRAM counter) | RAPL via NEMB |
474
+ | macOS ARM64 (Apple Silicon) | Pre-built wheel | Full (CPU, GPU, ANE, DRAM) | IOReport + kpc via NEMB |
475
+ | macOS Intel | From source | Full | IOReport via NEMB |
476
+ | Windows 11 (Intel) | From source | Full (PKG, core, iGPU, DRAM) | EMI via intelpep.sys |
477
+ | Windows 11 (AMD) | From source | Unverified | EMI may not expose AMD RAPL |
478
+ | NVIDIA GPU (any OS) | Automatic | Full (cumulative mJ) | NVML |
479
+ | Other | From source | Time-only | Fallback |
480
+
464
481
  ### Requirements
465
482
 
466
- - Linux (kernel 5.0+, Ubuntu 20.04+, Debian 11+, Fedora 35+, MacOS)
467
483
  - Python 3.9+
468
- - CMake 3.16+, g++ 9+ (for source builds only)
469
- - Intel or AMD CPU with RAPL support
470
- - `perf` (for `codegreen run` and benchmark validation)
484
+ - Linux: kernel 5.0+, Intel/AMD CPU with RAPL support
485
+ - macOS: Apple Silicon (M1-M5) or Intel, sudo for energy measurement
486
+ - Windows 11: Intel/AMD CPU (EMI via inbox intelpep.sys driver, zero install)
487
+ - Source builds: CMake 3.16+, C++17 compiler
471
488
 
472
489
  ## Usage
473
490
 
@@ -510,7 +527,7 @@ JSON (default for `--json`), CSV, Markdown table, and text summary. The JSON out
510
527
 
511
528
  ## Language support
512
529
 
513
- Adding a new language requires only a JSON config file in `src/instrumentation/configs/` plus the tree-sitter grammar. No Python code changes needed.
530
+ Adding a new language requires only a JSON config file in `codegreen/instrumentation/configs/` plus the tree-sitter grammar. No Python code changes needed.
514
531
 
515
532
  Currently supported: Python, C, C++, JavaScript, Java.
516
533
 
@@ -529,7 +546,7 @@ bash scripts/generate_comparison_artifacts.sh docs/benchmarks/
529
546
 
530
547
  ## Energy Flow Graph (EFG)
531
548
 
532
- CodeGreen includes an Energy Flow Graph module (`src/analysis/cfg/`) that builds energy-annotated control flow graphs from source code:
549
+ CodeGreen includes an Energy Flow Graph module (`codegreen/analysis/cfg/`) that builds energy-annotated control flow graphs from source code:
533
550
 
534
551
  ```python
535
552
  from codegreen.analysis.cfg.builder import build_per_method_cfgs
@@ -544,7 +561,7 @@ Features: Ball & Larus branch heuristics, SCC-based hot path computation, three-
544
561
 
545
562
  ## Architecture
546
563
 
547
- - **C++ NEMB backend**: RAPL energy reading with sub-microsecond timestamping, configurable polling interval
564
+ - **C++ NEMB backend**: platform-aware energy measurement (RAPL on Linux, IOReport on macOS, EMI on Windows), sub-microsecond timestamping, background polling with lock-free ring buffers
548
565
  - **Python instrumentation**: tree-sitter AST analysis, config-driven checkpoint insertion
549
566
  - **Energy Flow Graph**: CFG + energy annotation for path-dependent analysis
550
567
  - **Benchmark harness**: multi-suite support (benchmarksgame, PerfOpt), statistical analysis with t-distribution CI, IQR outlier detection, profiler comparison
@@ -17,7 +17,7 @@ CodeGreen is a comprehensive tool for fine-grained energy profiling and optimiza
17
17
  pip install codegreen
18
18
  ```
19
19
 
20
- Requires Linux with RAPL support. The wheel includes the pre-built C++ measurement backend.
20
+ Pre-built wheels available for Linux x86_64 and macOS ARM64 (Apple Silicon). Includes the native NEMB energy measurement backend.
21
21
 
22
22
  ### From source (recommended for development)
23
23
 
@@ -26,18 +26,33 @@ git clone https://github.com/SMART-Dal/codegreen.git
26
26
  cd codegreen
27
27
  ./install.sh
28
28
 
29
- # For RAPL sensor access (one-time, requires sudo):
29
+ # Linux: RAPL sensor access (one-time, requires sudo):
30
30
  sudo ./install.sh # or: sudo codegreen init-sensors
31
- # Then log out and back in for group permissions
31
+
32
+ # macOS: energy measurement requires sudo (IOReport access):
33
+ sudo codegreen run -- python script.py
32
34
  ```
33
35
 
36
+ ### Platform support
37
+
38
+ | Platform | pip install | Energy measurement | Backend |
39
+ |----------|------------|-------------------|---------|
40
+ | Linux x86_64 (Intel) | Pre-built wheel | Full (PKG, core, iGPU, DRAM) | RAPL via NEMB |
41
+ | Linux x86_64 (AMD) | Pre-built wheel | Full (PKG, no DRAM counter) | RAPL via NEMB |
42
+ | macOS ARM64 (Apple Silicon) | Pre-built wheel | Full (CPU, GPU, ANE, DRAM) | IOReport + kpc via NEMB |
43
+ | macOS Intel | From source | Full | IOReport via NEMB |
44
+ | Windows 11 (Intel) | From source | Full (PKG, core, iGPU, DRAM) | EMI via intelpep.sys |
45
+ | Windows 11 (AMD) | From source | Unverified | EMI may not expose AMD RAPL |
46
+ | NVIDIA GPU (any OS) | Automatic | Full (cumulative mJ) | NVML |
47
+ | Other | From source | Time-only | Fallback |
48
+
34
49
  ### Requirements
35
50
 
36
- - Linux (kernel 5.0+, Ubuntu 20.04+, Debian 11+, Fedora 35+, MacOS)
37
51
  - Python 3.9+
38
- - CMake 3.16+, g++ 9+ (for source builds only)
39
- - Intel or AMD CPU with RAPL support
40
- - `perf` (for `codegreen run` and benchmark validation)
52
+ - Linux: kernel 5.0+, Intel/AMD CPU with RAPL support
53
+ - macOS: Apple Silicon (M1-M5) or Intel, sudo for energy measurement
54
+ - Windows 11: Intel/AMD CPU (EMI via inbox intelpep.sys driver, zero install)
55
+ - Source builds: CMake 3.16+, C++17 compiler
41
56
 
42
57
  ## Usage
43
58
 
@@ -80,7 +95,7 @@ JSON (default for `--json`), CSV, Markdown table, and text summary. The JSON out
80
95
 
81
96
  ## Language support
82
97
 
83
- Adding a new language requires only a JSON config file in `src/instrumentation/configs/` plus the tree-sitter grammar. No Python code changes needed.
98
+ Adding a new language requires only a JSON config file in `codegreen/instrumentation/configs/` plus the tree-sitter grammar. No Python code changes needed.
84
99
 
85
100
  Currently supported: Python, C, C++, JavaScript, Java.
86
101
 
@@ -99,7 +114,7 @@ bash scripts/generate_comparison_artifacts.sh docs/benchmarks/
99
114
 
100
115
  ## Energy Flow Graph (EFG)
101
116
 
102
- CodeGreen includes an Energy Flow Graph module (`src/analysis/cfg/`) that builds energy-annotated control flow graphs from source code:
117
+ CodeGreen includes an Energy Flow Graph module (`codegreen/analysis/cfg/`) that builds energy-annotated control flow graphs from source code:
103
118
 
104
119
  ```python
105
120
  from codegreen.analysis.cfg.builder import build_per_method_cfgs
@@ -114,7 +129,7 @@ Features: Ball & Larus branch heuristics, SCC-based hot path computation, three-
114
129
 
115
130
  ## Architecture
116
131
 
117
- - **C++ NEMB backend**: RAPL energy reading with sub-microsecond timestamping, configurable polling interval
132
+ - **C++ NEMB backend**: platform-aware energy measurement (RAPL on Linux, IOReport on macOS, EMI on Windows), sub-microsecond timestamping, background polling with lock-free ring buffers
118
133
  - **Python instrumentation**: tree-sitter AST analysis, config-driven checkpoint insertion
119
134
  - **Energy Flow Graph**: CFG + energy annotation for path-dependent analysis
120
135
  - **Benchmark harness**: multi-suite support (benchmarksgame, PerfOpt), statistical analysis with t-distribution CI, IQR outlier detection, profiler comparison
@@ -5,7 +5,7 @@ A comprehensive energy measurement and code optimization tool for developers
5
5
  and researchers who need precise, fine-grained energy consumption analysis.
6
6
  """
7
7
 
8
- __version__ = "0.2.2"
8
+ __version__ = "0.3.1"
9
9
  __author__ = "Saurabhsingh Rajput"
10
10
  __email__ = "saurabh@dal.ca"
11
11
  __description__ = "Energy-aware software development tool"