Skip to content
Open
Show file tree
Hide file tree
Changes from 156 commits
Commits
Show all changes
161 commits
Select commit Hold shift + click to select a range
f25aade
Adding ROCpd Analysis
ammarwa Feb 7, 2026
499ee79
Fixing ROCPD Analysis Tests
ammarwa Feb 17, 2026
abe80ff
Adding JSON Scheme
ammarwa Feb 18, 2026
f35d720
Fix format→output_format mapping and GPU-less build failures
ammarwa Feb 18, 2026
4515fe6
Add webview output format and fix file extension handling
ammarwa Feb 19, 2026
8199d86
docs(ai_analysis): document webview format and auto file extensions
ammarwa Feb 19, 2026
99ad45e
feat(webview): add rich hover tooltips to all graphs and counters
ammarwa Feb 19, 2026
824e815
docs(ai_analysis): document hover tooltips added to webview report
ammarwa Feb 19, 2026
9ce5107
feat(webview): redesign webview UI/UX with AMD dashboard styling
ammarwa Feb 23, 2026
8ebf1f8
fix(webview): use Unicode char instead of HTML entity in CSS content
ammarwa Feb 23, 2026
a356c57
docs(ai_analysis): add v0.1.4 changelog entry for CSS content fix
ammarwa Feb 24, 2026
17579be
fix(webview): pin tooltip text color so it is readable in light theme
ammarwa Feb 24, 2026
444e981
docs(ai_analysis): add v0.1.5 changelog entry for tooltip color fix
ammarwa Feb 24, 2026
32ccd73
fix(recommendations): suppress redundant re-collection commands
ammarwa Feb 24, 2026
f2b543e
fix(recommendations): also drop rocprof-sys --trace when sys-trace pr…
ammarwa Feb 24, 2026
3a34c47
docs(llm-fence): add context-aware profiling recommendation rules
ammarwa Feb 24, 2026
aeaa15c
docs(llm-fence): replace explicit flag lists with reasoning directive
ammarwa Feb 24, 2026
dc9cf59
chore: add .gitignore entries for Claude session data and Python cache
ammarwa Feb 24, 2026
819fedc
fix(ai_analysis): address all audit issues + add --llm-model CLI flag
ammarwa Feb 27, 2026
452bcfa
fix(ai_analysis): pass path as list to RocpdImportData
ammarwa Feb 27, 2026
e8a59a1
test(ai_analysis): register unit tests with CTest mechanism
ammarwa Feb 27, 2026
1ad28af
fix(llm): handle max_completion_tokens for newer OpenAI models; clari…
ammarwa Feb 27, 2026
02175e6
fix(analyze): suppress recommendations for already-collected PMC coun…
ammarwa Feb 27, 2026
1d80de2
docs: update docs for PMC deduplication, OpenAI compat, CTest, format…
ammarwa Feb 27, 2026
469d789
docs(llm): enrich reference guide with AMD profiling workflow and cou…
ammarwa Mar 2, 2026
ce60907
feat: add SessionStore + SessionData for interactive session persistence
ammarwa Mar 10, 2026
823a20d
fix: improve SessionStore robustness + add missing tests
ammarwa Mar 10, 2026
37c8b9f
feat(interactive): add InteractiveSession skeleton with main menu and…
ammarwa Mar 10, 2026
11be4b7
fix(interactive): handle EOFError in run(), feedback on bad choices, …
ammarwa Mar 10, 2026
ced2b0a
feat(interactive): implement _path_profiling with helper methods (Tas…
ammarwa Mar 10, 2026
9512986
feat(llm): add local LLM (Ollama) support to LLMAnalyzer (Task 4)
ammarwa Mar 10, 2026
35bbce4
fix(interactive,llm): apply code quality fixes for stdout pollution, …
ammarwa Mar 10, 2026
6fbc77d
feat(interactive): implement _path_optimize with two-stage LLM pipeli…
ammarwa Mar 11, 2026
82dd202
fix(interactive): apply 6 code quality fixes (atomic write, shell saf…
ammarwa Mar 11, 2026
82c61e4
feat(cli): wire InteractiveSession to CLI — Task 7
ammarwa Mar 11, 2026
e12fe82
feat: interactive session smoke test verified
ammarwa Mar 11, 2026
f6c958c
fix(interactive): wire code_change_analysis source tag and deduplicat…
ammarwa Mar 11, 2026
1d8710e
feat(llm): add AnalysisContext dataclass and _select_tags function
ammarwa Mar 11, 2026
c7ba9f2
fix(llm): move relative import to top, add return type to _select_tags
ammarwa Mar 11, 2026
235faf7
feat(llm): add _filter_guide and wire context into _build_system_prompt
ammarwa Mar 11, 2026
74bf4ec
fix(llm): move _TAG_RE to module level, guard verbose div-by-zero
ammarwa Mar 11, 2026
7efbbc2
feat(llm): propagate AnalysisContext through analyze_with_llm methods
ammarwa Mar 11, 2026
1881433
fix(llm): remove unnecessary forward-reference quotes from AnalysisCo…
ammarwa Mar 11, 2026
8912a9e
feat(llm): export AnalysisContext from rocpd.ai_analysis public API
ammarwa Mar 11, 2026
5b3e27d
feat(llm): build and pass AnalysisContext from analyze.py LLM call sites
ammarwa Mar 11, 2026
3827e26
feat(llm): tag all reference guide sections with rocpd-context markers
ammarwa Mar 11, 2026
f9fabfb
docs(llm): add LLM_GUIDE_SECTIONS.md and AnalysisContext API docs
ammarwa Mar 11, 2026
e7f4f97
test(cmake): register guide filter unit tests with ctest
ammarwa Mar 11, 2026
1a1132f
fix(security): shell quoting, path traversal, XSS, exception safety, …
ammarwa Mar 11, 2026
9f8d231
fix(security): fix C-2 NameError risk in Tier0 LLM finally block
ammarwa Mar 11, 2026
dfac10e
fix(security): clamp overhead_time_ms in text formatters, document ar…
ammarwa Mar 11, 2026
c18ba04
fix(analysis): correct bottleneck classification, pass AnalysisContex…
ammarwa Mar 11, 2026
3ba74a6
fix(analysis): add reason field to hardware counters exception path
ammarwa Mar 11, 2026
bb8934f
fix(llm): defer key validation, honor self.model, fix exception arg t…
ammarwa Mar 11, 2026
51cf882
fix(quality): dedup conversion helper, version constant, lazy import,…
ammarwa Mar 11, 2026
e654546
test+docs(fixes): add tests and docs for all code review bug fixes
ammarwa Mar 11, 2026
910d32e
fix(review): address final code review findings
ammarwa Mar 11, 2026
653867d
feat(llm): add --llm-thinking flag for extended thinking support
ammarwa Mar 11, 2026
4240017
docs(llm-reference): fix critical errors, add PC sampling section, st…
ammarwa Mar 11, 2026
46b5bb1
fix(interactive): _select_hot_files fails when tier0 is SourceAnalysi…
ammarwa Mar 11, 2026
96a6c0a
fix(interactive): bracket keys hidden by Rich markup, Enter not accep…
ammarwa Mar 11, 2026
5159d77
fix(interactive): duplicate hot-files, no-LLM silent exit, show relat…
ammarwa Mar 11, 2026
0af0517
fix(interactive): run commands directly, fix LLM format, fix dead code
ammarwa Mar 11, 2026
bb97551
feat: add WorkflowState dataclass for 7-phase workflow
ammarwa Mar 11, 2026
0fd6f72
feat: implement WorkflowSession 7-phase interactive workflow; add roc…
ammarwa Mar 11, 2026
ea34c87
fix: WorkflowSession Phase 4 forwards llm_provider/llm_api_key to ana…
ammarwa Mar 11, 2026
4349171
feat(tracelens): add tracelens_port.py with interval math and kernel …
ammarwa Mar 11, 2026
c4f468f
test(tracelens): add _subtract_intervals unit tests; fix docstring
ammarwa Mar 11, 2026
1a80866
test(tracelens): add 13 DB-dependent unit tests + integration test fo…
ammarwa Mar 11, 2026
a2b46a3
feat(tracelens): wire compute_interval_timeline, analyze_kernels_by_c…
ammarwa Mar 11, 2026
221d7a3
feat(tracelens): add kernel category + short kernel sections to all 4…
ammarwa Mar 11, 2026
25344ac
feat(tracelens): add kernel_categories, short_kernels, interval_timel…
ammarwa Mar 11, 2026
a4fb215
feat(tracelens): wire TraceLens data into AnalysisContext, LLM prompt…
ammarwa Mar 11, 2026
6758084
docs(tracelens): add tracelens_metrics section to llm-reference-guide…
ammarwa Mar 11, 2026
79f77c0
fix(tracelens): pass TraceLens keys through _sanitize_data(); fix tes…
ammarwa Mar 11, 2026
224570b
feat: add SessionContext dataclass and SessionData.context field
ammarwa Mar 11, 2026
0edff2d
test: fix misleading comment in backward-compat test
ammarwa Mar 11, 2026
13ceb55
refactor: _run_tier1_analysis returns (recs, breakdown) tuple
ammarwa Mar 11, 2026
a2ee8ad
feat: add context update methods and wire at analysis/command call sites
ammarwa Mar 11, 2026
d3260ba
feat: add _format_context_block and inject into LLM call sites
ammarwa Mar 11, 2026
385bd63
feat: add _extract_ai_commands and _offer_run_ai_commands
ammarwa Mar 11, 2026
bc7743f
feat: persist SessionContext on save; restore on session resume
ammarwa Mar 11, 2026
27165f1
fix: update test_interactive mocks for tuple return; add integration …
ammarwa Mar 11, 2026
d32d17d
docs: update README and CLAUDE.md for interactive session context fea…
ammarwa Mar 11, 2026
b548683
fix(interactive): correct re-profiling UX — commands, menu, and defau…
ammarwa Mar 11, 2026
4f0267c
fix(interactive): strip --kernel-names flag and retry LLM rewrite on …
ammarwa Mar 12, 2026
2c89797
fix(interactive): strip hallucinated rocprofv3 flags from AI-recommen…
ammarwa Mar 12, 2026
99d2eca
fix: replace invalid --hip-api-trace with --hip-trace in recommendations
ammarwa Mar 12, 2026
dd7e7b6
fix(llm): increase timeout to 300s for file rewrite calls
ammarwa Mar 12, 2026
2962e12
docs: add LLMConversation persistent streaming session spec
ammarwa Mar 12, 2026
fca3f9a
docs: add LLMConversation implementation plan
ammarwa Mar 12, 2026
0e7f86f
feat: add LLMConversation streaming persistent session class
ammarwa Mar 12, 2026
ca5f945
feat: expose load_reference_guide() and LLMConversation in ai_analysi…
ammarwa Mar 12, 2026
4d9109d
feat: replace SessionContext with LLMConversation in InteractiveSession
ammarwa Mar 12, 2026
ed0b63a
feat: add --llm-compact-every CLI flag for LLMConversation compaction…
ammarwa Mar 12, 2026
375772a
feat: add integration tests and source-dedup for LLMConversation
ammarwa Mar 12, 2026
38fdeeb
feat: add private/enterprise OpenAI-compatible LLM server support
ammarwa Mar 12, 2026
760ace3
feat: add SSL verification control for private LLM provider
ammarwa Mar 12, 2026
a07574d
fix: accept single-quoted Python dict literals in ROCPD_LLM_PRIVATE_H…
ammarwa Mar 12, 2026
78c0593
docs(fence): add vLLM ROCm pitfalls — pin_memory is not an LLM() param
ammarwa Mar 12, 2026
277be8f
fix(interactive): route 'private' provider to _call_private() for fil…
ammarwa Mar 12, 2026
2a19edf
docs: update README and API docs for private LLM provider and LLMConv…
ammarwa Mar 12, 2026
7515350
fix(llm): address 4 code-review issues in private provider and sessio…
ammarwa Mar 12, 2026
8242be8
feat(interactive): cycle-break + go-deeper + AI-edit revert
ammarwa Mar 12, 2026
b8e1702
fix(llm+interactive): ban __builtin_amdgcn_sin/cos; teach session fro…
ammarwa Mar 12, 2026
ea93c1f
fix(interactive): code-review fixes + docs update for cycle-break/revert
ammarwa Mar 12, 2026
85fbfc2
feat(interactive): Phase 1b quick workload analysis for starter command
ammarwa Mar 12, 2026
f44d96e
fix(interactive): add session persistence for WorkflowSession + Ctrl+…
ammarwa Mar 12, 2026
bb1497f
fix(interactive): real LLM failure analysis on revert instead of fake…
ammarwa Mar 12, 2026
e1a44f2
feat(interactive): what-next menu after revert + retry loop in Phase 6
ammarwa Mar 12, 2026
740e724
fix(interactive): code-review fixes — env-strip, allow_retry, ask-bef…
ammarwa Mar 13, 2026
b78a6cb
build(python): add tracelens_port.py, MAKE_DIRECTORY fix, logo asset …
ammarwa Mar 13, 2026
40d02dd
feat(interactive): multi-process profiling with --process-sync, %nid%…
ammarwa Mar 13, 2026
be84f51
chore: remove CLAUDE.md and superpowers plan/spec docs from branch tr…
ammarwa Mar 13, 2026
0495fa8
fix(build): use file(COPY) instead of configure_file for AI analysis …
ammarwa Mar 13, 2026
1ba1f74
style(cmake): fix formatting in utilities.cmake
ammarwa Mar 13, 2026
9f88774
fix(lint): resolve all flake8 F401/F541/F841/E225/E231 issues across …
ammarwa Mar 13, 2026
46e33ca
fix(lint): black formatting + reviewer code fixes
ammarwa Mar 13, 2026
31fb3cc
fix(test): use urlparse to validate \$schema domain exactly
ammarwa Mar 13, 2026
091d349
fix(lint): apply cmake-format, black, and flake8 fixes to remaining f…
ammarwa Mar 13, 2026
cad8f03
fix(lint): reformat with black --target-version py310 to match CI
ammarwa Mar 13, 2026
631c349
fix(lint): reformat with Python 3.10 black and remove hardcoded paths
ammarwa Mar 13, 2026
6661655
fix(lint): apply exact black formatting from CI (Python 3.10 clean env)
ammarwa Mar 13, 2026
1010419
fix(review): address new Copilot PR comments
ammarwa Mar 13, 2026
79892fc
fix(rocpd): address PR review comments on LLMConversation and schema
ammarwa Mar 13, 2026
4126073
fix(rocpd): address code review findings from proactive review
ammarwa Mar 13, 2026
72c7334
fix(rocpd): address remaining PR inline review comments
ammarwa Mar 13, 2026
70abadd
style(rocpd): cmake-format utilities.cmake
ammarwa Mar 13, 2026
91b27fa
fix(schema): add Tier 0 compatibility and schema validation tests
ammarwa Mar 13, 2026
4e9a075
fix(python36): replace re.Pattern and importlib.resources with py3.6-…
ammarwa Mar 13, 2026
1e5b997
fix(tests): remove gfx000 placeholder; require GPU for hardware tests
ammarwa Mar 13, 2026
8b15d99
fix(llm): validate ROCPD_LLM_PRIVATE_HEADERS is a JSON object
ammarwa Mar 13, 2026
d5807ab
perf(llm): accumulate stream chunks in list; join once at end
ammarwa Mar 13, 2026
d55d091
feat(checkpoints): add CheckpointRecord dataclass and CheckpointError
ammarwa Mar 13, 2026
b6c3eeb
fix(tests): move pytest import to top of test_workflow.py
ammarwa Mar 13, 2026
f862274
feat(checkpoints): add checkpoint fields to WorkflowState and _EditRe…
ammarwa Mar 13, 2026
18fe6b1
feat(checkpoints): add GitCheckpointManager class
ammarwa Mar 13, 2026
169b60d
test(checkpoints): add missing GCM tests and fix import placement
ammarwa Mar 13, 2026
d7b0a7c
feat(checkpoints): add _init_checkpoints — git detection and dirty check
ammarwa Mar 13, 2026
969320f
fix(checkpoints): handle get_head() failure gracefully in _init_check…
ammarwa Mar 13, 2026
5f3f434
feat(checkpoints): add _create_checkpoint and hook into Phase 6
ammarwa Mar 13, 2026
551eca2
fix(checkpoints): compute _rel_path once in Phase 6 checkpoint hook
ammarwa Mar 13, 2026
1a0efeb
feat(checkpoints): record run index and performance delta per checkpoint
ammarwa Mar 13, 2026
9b6a67f
fix(checkpoints): split run_index (Phase3) and delta (Phase4) into se…
ammarwa Mar 13, 2026
d7d7517
feat(checkpoints): add rollback, blacklist, and blacklist-block methods
ammarwa Mar 13, 2026
852569d
fix(checkpoints): rollback baseline always clears state; blacklist sa…
ammarwa Mar 13, 2026
2ec3826
feat(checkpoints): add [b] rollback option to Phase 5 menu
ammarwa Mar 13, 2026
0da7d3c
fix(checkpoints): cp_id validation, baseline blacklist, _input() usage
ammarwa Mar 13, 2026
3961c9a
feat(checkpoints): inject blacklist block into Phase 6 LLM prompt
ammarwa Mar 13, 2026
973a10d
feat(checkpoints): worktree teardown on exit and stale pruning on start
ammarwa Mar 13, 2026
3c1e0a7
fix(checkpoints): guard teardown against exceptions and empty worktre…
ammarwa Mar 13, 2026
8d5bde2
feat(checkpoints): complete session checkpoint system with git worktrees
ammarwa Mar 13, 2026
ea00734
fix(checkpoints): critical and important quality fixes from code review
ammarwa Mar 13, 2026
4432ff3
docs(checkpoints): document session checkpoint system in AI_ANALYSIS_…
ammarwa Mar 13, 2026
c109c7e
fix(checkpoints): silently disable checkpoints on dirty tree instead …
ammarwa Mar 13, 2026
37e9f6d
fix(checkpoints): remove dirty-tree check — only AI-modified files ar…
ammarwa Mar 13, 2026
b22d4ba
refactor(checkpoints): remove unused is_dirty method and update docs
ammarwa Mar 13, 2026
8cf423f
fix(checkpoints): remove dirty-tree check, fix flake8 F841, apply bla…
ammarwa Mar 13, 2026
c534a86
fix(review): validate ROCPD_LLM_PRIVATE_HEADERS is a dict; fix Py3.6 …
ammarwa Mar 13, 2026
2ab8820
fix(tests): fix two ctest failures — wrong tool filter and missing kn…
ammarwa Mar 13, 2026
f667bd9
fix(cmake): replace configure_file COPYONLY with build-time staging f…
ammarwa Mar 13, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 13 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,15 @@
.cline_storage
/projects/hip/_build

# Claude Code session data
.claude/
**/.claude/

# Python
__pycache__/
**/__pycache__/
*.pyc
*.pyo

# Analysis output generated during testing
rocpd-output-data/
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,17 @@ function(rocprofiler_sdk_pc_sampling_disabled _VAR)
set(CMAKE_MESSAGE_INDENT "[${PROJECT_NAME}]${ARG_PREFIX} ")

rocprofiler_sdk_get_gfx_architectures(rocprofiler-sdk-tests-gfx-info ECHO)
# Guard against empty GPU list (e.g. build machine without GPUs)
list(LENGTH rocprofiler-sdk-tests-gfx-info _gfx_list_len)
if(_gfx_list_len EQUAL 0)
set(${_VAR}
TRUE
PARENT_SCOPE)
if(ARG_ECHO)
message(STATUS "PC Sampling is disabled (no GPUs detected)")
endif()
return()
endif()
list(GET rocprofiler-sdk-tests-gfx-info 0 pc-sampling-gpu-0-gfx-info)

if("${pc-sampling-gpu-0-gfx-info}" MATCHES "^gfx90a$"
Expand Down Expand Up @@ -88,6 +99,17 @@ function(rocprofiler_sdk_pc_sampling_stochastic_disabled _VAR)
set(CMAKE_MESSAGE_INDENT "[${PROJECT_NAME}]${ARG_PREFIX} ")

rocprofiler_sdk_get_gfx_architectures(rocprofiler-sdk-tests-gfx-info ECHO)
# Guard against empty GPU list (e.g. build machine without GPUs)
list(LENGTH rocprofiler-sdk-tests-gfx-info _gfx_list_len)
if(_gfx_list_len EQUAL 0)
set(${_VAR}
TRUE
PARENT_SCOPE)
if(ARG_ECHO)
message(STATUS "Stochastic PC Sampling is disabled (no GPUs detected)")
endif()
return()
endif()
list(GET rocprofiler-sdk-tests-gfx-info 0 pc-sampling-gpu-0-gfx-info)

if("${pc-sampling-gpu-0-gfx-info}" MATCHES "^gfx94[0-9]$"
Expand Down
5 changes: 4 additions & 1 deletion projects/rocprofiler-sdk/source/bin/rocprofv3.py
Original file line number Diff line number Diff line change
Expand Up @@ -1291,7 +1291,10 @@ def _write_env_value():
args.output_format = ["rocpd"]

update_env(
"ROCPROF_OUTPUT_FORMAT", ",".join(args.output_format), append=True, join_char=","
"ROCPROF_OUTPUT_FORMAT",
",".join(args.output_format),
append=True,
join_char=",",
)

if args.kokkos_trace:
Expand Down
84 changes: 84 additions & 0 deletions projects/rocprofiler-sdk/source/lib/python/rocpd/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ def main(argv=None, config=None):

"""
import argparse
from . import analyze
from . import csv
from . import merge
from . import otf2
Expand Down Expand Up @@ -123,6 +124,27 @@ def main(argv=None, config=None):
Aggregate 2 databases and output all summary files to HTML, only include HIP and MARKER regions, include domain summary
$ rocpd summary -i db{0,1}.db --region-categories HIP MARKERS --domain-summary --format html

"""

analyze_examples = """

Example usage:

Analyze performance of a single database
$ rocpd analyze -i db0.db

Analyze with output to file
$ rocpd analyze -i db0.db --format text -d ./output/ -o analysis

Analyze top 20 kernels instead of default 10
$ rocpd analyze -i db{0..3}.db --top-kernels 20

Analyze with a custom prompt (guides local analysis; enhances LLM output when --llm is used)
$ rocpd analyze -i db0.db --prompt "Why is my application slow?"

Analyze with LLM-enhanced explanation
$ rocpd analyze -i db0.db --llm anthropic

"""
input_help_string = "Input path and filename to one or more database(s). Wildcards accepted, as well as .rpdb folders"

Expand Down Expand Up @@ -193,6 +215,14 @@ def add_required_args(_parser):
epilog=summary_examples,
)

analyzer = subparsers.add_parser(
"analyze",
description="Analyze GPU performance traces with AI-powered insights",
allow_abbrev=False,
formatter_class=argparse.RawTextHelpFormatter,
epilog=analyze_examples,
)

def get_output_type(val):
return val.lower().replace("perfetto", "pftrace")

Expand All @@ -213,6 +243,17 @@ def get_output_type(val):
add_required_args(packager)
add_required_args(query_reporter)
add_required_args(generate_summary)
# analyze: -i is optional (not required when --source-dir is used for Tier 0)
_analyze_input_group = analyzer.add_argument_group("Required options")
_analyze_input_group.add_argument(
"-i",
"--input",
required=False,
default=None,
type=output_config.check_file_exists,
nargs="+",
help=input_help_string,
)

# converter: add args from any sub-modules
process_converter_args = []
Expand Down Expand Up @@ -243,6 +284,12 @@ def get_output_type(val):
process_generate_summary_args.append(summary.add_args(generate_summary))
process_generate_summary_args.append(time_window.add_args(generate_summary))

# analyze: subparser args
process_analyzer_args = []
process_analyzer_args.append(output_config.add_args(analyzer))
process_analyzer_args.append(analyze.add_args(analyzer))
process_analyzer_args.append(time_window.add_args(analyzer))

# parse the command line arguments
args = parser.parse_args(argv)

Expand Down Expand Up @@ -355,6 +402,43 @@ def get_output_type(val):

summary.generate_all_summaries(input, **summary_args)

# if the user requested AI analysis, execute the analyzer
elif args.command == "analyze":
# Validate: at least one of -i, --source-dir, or --interactive must be provided
has_input = bool(getattr(args, "input", None))
has_source_dir = bool(getattr(args, "source_dir", None))
has_interactive = bool(getattr(args, "interactive", None))
if not has_input and not has_source_dir and not has_interactive:
analyzer.error(
"at least one of -i/--input, --source-dir, or --interactive is required.\n"
" Use -i output.db for trace analysis (Tier 1/2).\n"
" Use --source-dir ./src for source code analysis (Tier 0).\n"
' Use --interactive "./my_app" for the 7-phase workflow.\n'
" Use both -i and --source-dir for combined analysis."
)

# construct the rocpd import data object (None if source-only)
if has_input:
input = RocpdImportData(
args.input,
automerge_limit=getattr(
args, "automerge_limit", package.IDEAL_NUMBER_OF_DATABASE_FILES
),
)
else:
input = None

# analyzer subparser args
analyzer_args = {}
for pitr in process_analyzer_args:
analyzer_args.update(pitr(input, args))

# Pass source_dir if provided
if has_source_dir:
analyzer_args["source_dir"] = args.source_dir

analyze.execute(input, **analyzer_args)

print("Done. Exiting...")


Expand Down
Loading
Loading