Skip to content

[Basic] Don't use defined(LLVM_ENABLE_STATS) as it can be set to 0 #35832

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 2 commits into from
Feb 9, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
2 changes: 1 addition & 1 deletion lib/Basic/Statistic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -703,7 +703,7 @@ UnifiedStatsReporter::~UnifiedStatsReporter()
// compile-time) so we sequence printing our own stats and LLVM's timers
// manually.

#if !defined(NDEBUG) || defined(LLVM_ENABLE_STATS)
#if !defined(NDEBUG) || LLVM_ENABLE_STATS
publishAlwaysOnStatsToLLVM();
PrintStatisticsJSON(ostream);
TimerGroup::clearAll();
Expand Down
1 change: 0 additions & 1 deletion test/Driver/pipe_round_robin.swift.gyb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// Windows doesn't track/use read() and poll()
// UNSUPPORTED: windows
// REQUIRES: rdar73834542
// RUN: %empty-directory(%t/manyfuncs)
// RUN: %empty-directory(%t/stats)
//
Expand Down
1 change: 0 additions & 1 deletion test/Misc/stats_dir.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: rdar73834542
// RUN: %empty-directory(%t)
// RUN: %target-swift-frontend -c -o %t/out.o -stats-output-dir %t %s
// RUN: %{python} %utils/process-stats-dir.py --set-csv-baseline %t/frontend.csv %t
Expand Down
1 change: 0 additions & 1 deletion test/Misc/stats_dir_failure_count.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// Check that a failed process-tree emits nonzero failure counters
// REQUIRES: rdar73834542
// RUN: %empty-directory(%t)
// RUN: echo zzz >%t/other.swift
// RUN: not %target-swiftc_driver -continue-building-after-errors -D BROKEN -j 2 -typecheck -stats-output-dir %t %s %t/other.swift
Expand Down
1 change: 0 additions & 1 deletion test/Misc/stats_dir_instructions.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// REQUIRES: OS=macosx
// REQUIRES: rdar73834542
// RUN: %empty-directory(%t)
// RUN: %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t %s
// RUN: %{python} %utils/process-stats-dir.py --set-csv-baseline %t/frontend.csv %t
Expand Down
1 change: 0 additions & 1 deletion test/Misc/stats_dir_long_path_name.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
// REQUIRES: OS=macosx
// REQUIRES: rdar73834542
// RUN: %empty-directory(%t)
// RUN: mkdir -p %t/very-long-directory-name-that-contains-over-128-characters-which-is-not-enough-to-be-illegal-on-its-own-but-presents
// RUN: cp %s %t/very-long-directory-name-that-contains-over-128-characters-which-is-not-enough-to-be-illegal-on-its-own-but-presents/a-problem-when-combined-with-other-long-path-elements-and-filenames-to-exceed-256-characters-combined-because-yay-arbitrary-limits-amirite.swift
Expand Down
1 change: 0 additions & 1 deletion test/Misc/stats_dir_plausible_maxrss.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: rdar73834542
// RUN: %empty-directory(%t)
// RUN: touch %t/main.swift
// RUN: %target-swiftc_driver -o %t/main -module-name main -stats-output-dir %t %t/main.swift
Expand Down
1 change: 0 additions & 1 deletion test/NameLookup/named_lazy_member_loading_anyobject.swift
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// REQUIRES: objc_interop
// REQUIRES: OS=macosx
// REQUIRES: rdar73834542
//
// RUN: %target-swift-frontend -typecheck -I %S/Inputs/NamedLazyMembers %s -verify

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// REQUIRES: objc_interop
// REQUIRES: OS=macosx
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Prime module cache
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// REQUIRES: objc_interop
// REQUIRES: OS=macosx
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Prime module cache
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// REQUIRES: objc_interop
// REQUIRES: OS=macosx
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Prime module cache
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
// REQUIRES: objc_interop
// REQUIRES: OS=macosx
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Prime module cache
Expand Down Expand Up @@ -38,4 +37,4 @@ public func foo(d: PrivateDoer) {

let _ = d.__count
let _ = d.__object(forKey: nil)
}
}
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Compile swiftmodule with decl member name tables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Compile swiftmodule with decl member name tables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Compile swiftmodule with decl member name tables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Compile swiftmodule with decl member name tables
Expand Down
1 change: 0 additions & 1 deletion test/NameLookup/named_lazy_member_loading_swift_enum.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Compile swiftmodule with decl member name tables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Compile swiftmodule with decl member name tables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Compile swiftmodule with decl member name tables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Compile swiftmodule with decl member name tables
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats-pre && mkdir -p %t/stats-post
//
// Compile swiftmodule with decl member name tables
Expand Down
1 change: 0 additions & 1 deletion test/SILOptimizer/hello-world.swift
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
// REQUIRES: rdar73834542
// RUN: rm -rf %t && mkdir -p %t/stats
// RUN: %target-swift-frontend -emit-sil -stats-output-dir %t/stats %s -o /dev/null
// RUN: %{python} %utils/process-stats-dir.py --evaluate 'NumSILGenFunctions < 10' %t/stats
Expand Down
2 changes: 0 additions & 2 deletions validation-test/compiler_scale/parse_array_nested.swift.gyb
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
// RUN: %scale-test -parse --begin 0 --end 10 --step 1 --select NumASTBytes %s

// REQUIRES: rdar73834542

%for i in range(1, N + 1):
[
%end
Expand Down