https://github.com/usx95 closed https://github.com/llvm/llvm-project/pull/99866
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
https://github.com/ilya-biryukov approved this pull request.
LGTM
https://github.com/llvm/llvm-project/pull/99866
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
@@ -209,7 +208,7 @@ constexpr int slow_init_list[] = {1, 1, 2, 3, 5, 8, 13,
21}; // 25th line
ASSERT_TRUE(compileFromString(Code, "-std=c++20", "test.cc"));
std::string Json = teardownProfiler();
ASSERT_EQ(R"(
-Frontend
+Frontend (, test.cc)
usx95 wrote:
https://github.com/usx95 updated https://github.com/llvm/llvm-project/pull/99866
>From e0d76b97e386421ac2e653c206f49f827b24e65b Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 22 Jul 2024 12:16:48 +
Subject: [PATCH 1/2] Record mainfile name in the Frontend time trace
---
clang/lib
@@ -81,7 +81,6 @@ std::string GetMetadata(json::Object *Event) {
if (json::Object *Args = Event->getObject("args")) {
if (auto Detail = Args->getString("detail"))
OS << Detail;
-// Use only filename to not include os-specific path separators.
us
@@ -152,7 +152,13 @@ void clang::ParseAST(Sema &S, bool PrintStats, bool
SkipFunctionBodies) {
bool HaveLexer = S.getPreprocessor().getCurrentLexer();
if (HaveLexer) {
-llvm::TimeTraceScope TimeScope("Frontend");
+llvm::TimeTraceScope TimeScope("Frontend", [&]() {
@@ -209,7 +208,7 @@ constexpr int slow_init_list[] = {1, 1, 2, 3, 5, 8, 13,
21}; // 25th line
ASSERT_TRUE(compileFromString(Code, "-std=c++20", "test.cc"));
std::string Json = teardownProfiler();
ASSERT_EQ(R"(
-Frontend
+Frontend (, test.cc)
ilya-biryuko
@@ -152,7 +152,13 @@ void clang::ParseAST(Sema &S, bool PrintStats, bool
SkipFunctionBodies) {
bool HaveLexer = S.getPreprocessor().getCurrentLexer();
if (HaveLexer) {
-llvm::TimeTraceScope TimeScope("Frontend");
+llvm::TimeTraceScope TimeScope("Frontend", [&]() {
@@ -81,7 +81,6 @@ std::string GetMetadata(json::Object *Event) {
if (json::Object *Args = Event->getObject("args")) {
if (auto Detail = Args->getString("detail"))
OS << Detail;
-// Use only filename to not include os-specific path separators.
il
https://github.com/usx95 edited https://github.com/llvm/llvm-project/pull/99866
___
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits
llvmbot wrote:
@llvm/pr-subscribers-clang
Author: Utkarsh Saxena (usx95)
Changes
---
Full diff: https://github.com/llvm/llvm-project/pull/99866.diff
2 Files Affected:
- (modified) clang/lib/Parse/ParseAST.cpp (+7-1)
- (modified) clang/unittests/Support/TimeProfilerTest.cpp (+3-4)
https://github.com/usx95 created https://github.com/llvm/llvm-project/pull/99866
None
>From e0d76b97e386421ac2e653c206f49f827b24e65b Mon Sep 17 00:00:00 2001
From: Utkarsh Saxena
Date: Mon, 22 Jul 2024 12:16:48 +
Subject: [PATCH] Record mainfile name in the Frontend time trace
---
clang/l
12 matches
Mail list logo