Skip to content

[analyzer] Refine TimeTrace name for dispatchWorkItem #128352

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 24, 2025

Conversation

steakhal
Copy link
Contributor

@llvmbot llvmbot added the clang Clang issues not falling into any other category label Feb 22, 2025
@llvmbot
Copy link
Member

llvmbot commented Feb 22, 2025

@llvm/pr-subscribers-clang

@llvm/pr-subscribers-clang-static-analyzer-1

Author: Balazs Benics (steakhal)

Changes

Fixes #125508 (comment)


Full diff: https://github.com/llvm/llvm-project/pull/128352.diff

2 Files Affected:

  • (modified) clang/lib/StaticAnalyzer/Core/CoreEngine.cpp (+1-1)
  • (modified) clang/test/Analysis/ftime-trace.cpp (+1-1)
diff --git a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
index bf1fd7c2356dc..d96211c3a6635 100644
--- a/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
+++ b/clang/lib/StaticAnalyzer/Core/CoreEngine.cpp
@@ -183,7 +183,7 @@ bool CoreEngine::ExecuteWorkList(const LocationContext *L, unsigned MaxSteps,
 
 static std::string timeTraceScopeName(const ProgramPoint &Loc) {
   if (llvm::timeTraceProfilerEnabled()) {
-    return llvm::formatv("Loc {0}",
+    return llvm::formatv("dispatchWorkItem {0}",
                          ProgramPoint::getProgramPointKindName(Loc.getKind()))
         .str();
   }
diff --git a/clang/test/Analysis/ftime-trace.cpp b/clang/test/Analysis/ftime-trace.cpp
index 2c369a9bf781e..2940ff2e02891 100644
--- a/clang/test/Analysis/ftime-trace.cpp
+++ b/clang/test/Analysis/ftime-trace.cpp
@@ -23,7 +23,7 @@
 // The trace also contains durations of each step, but they are so short that they are not reliably present
 // in each run. However, they are also aggregated into Total *, for example:
 //
-// CHECK:          "name": "Total Loc PostStmt",
+// CHECK:          "name": "Total dispatchWorkItem PostStmt",
 // CHECK-NEXT:     "args": {
 // CHECK-NEXT:         "count": {{[0-9]+}},
 // CHECK-NEXT:         "avg ms": {{[0-9]+}}

@steakhal
Copy link
Contributor Author

@necto

@steakhal steakhal merged commit 6b5bde6 into llvm:main Feb 24, 2025
14 checks passed
@steakhal steakhal deleted the bb/refine-time-trace-scope-name branch February 24, 2025 07:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
clang:static analyzer clang Clang issues not falling into any other category
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants