Skip to content

Commit 90682c3

Browse files
committed
Drop unused profile things
1 parent 8f27046 commit 90682c3

File tree

7 files changed

+0
-33
lines changed

7 files changed

+0
-33
lines changed

Cargo.lock

Lines changed: 0 additions & 10 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

crates/hir-def/Cargo.toml

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,6 @@ stdx.workspace = true
3737
intern.workspace = true
3838
base-db.workspace = true
3939
syntax.workspace = true
40-
profile.workspace = true
4140
hir-expand.workspace = true
4241
mbe.workspace = true
4342
cfg.workspace = true

crates/hir-def/src/item_scope.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ use hir_expand::{attrs::AttrId, db::ExpandDatabase, name::Name, AstId, MacroCall
88
use itertools::Itertools;
99
use la_arena::Idx;
1010
use once_cell::sync::Lazy;
11-
use profile::Count;
1211
use rustc_hash::{FxHashMap, FxHashSet};
1312
use smallvec::{smallvec, SmallVec};
1413
use stdx::format_to;
@@ -65,8 +64,6 @@ pub struct ImportId {
6564

6665
#[derive(Debug, Default, PartialEq, Eq)]
6766
pub struct ItemScope {
68-
_c: Count<Self>,
69-
7067
/// Defs visible in this scope. This includes `declarations`, but also
7168
/// imports. The imports belong to this module and can be resolved by using them on
7269
/// the `use_imports_*` fields.
@@ -722,7 +719,6 @@ impl ItemScope {
722719
pub(crate) fn shrink_to_fit(&mut self) {
723720
// Exhaustive match to require handling new fields.
724721
let Self {
725-
_c: _,
726722
types,
727723
values,
728724
macros,

crates/ide/src/status.rs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -44,9 +44,6 @@ pub(crate) fn status(db: &RootDatabase, file_id: Option<FileId>) -> String {
4444
format_to!(buf, "{}\n", collect_query(LibrarySymbolsQuery.in_db(db)));
4545
format_to!(buf, "{}\n", collect_query(ModuleSymbolsQuery.in_db(db)));
4646
format_to!(buf, "{} in total\n", memory_usage());
47-
if env::var("RA_COUNT").is_ok() {
48-
format_to!(buf, "\nCounts:\n{}", profile::countme::get_all());
49-
}
5047

5148
format_to!(buf, "\nDebug info:\n");
5249
format_to!(buf, "{}\n", collect_query(AttrsQuery.in_db(db)));

crates/profile/Cargo.toml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,8 @@ rust-version.workspace = true
1212
doctest = false
1313

1414
[dependencies]
15-
once_cell = "1.17.0"
16-
tracing.workspace = true
1715
cfg-if = "1.0.0"
18-
la-arena.workspace = true
1916
libc.workspace = true
20-
countme = { version = "3.0.1", features = ["enable"] }
2117
jemalloc-ctl = { version = "0.5.0", package = "tikv-jemalloc-ctl", optional = true }
2218

2319
[target.'cfg(target_os = "linux")'.dependencies]

crates/profile/src/lib.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,6 @@ pub use crate::{
1212
stop_watch::{StopWatch, StopWatchSpan},
1313
};
1414

15-
pub use countme;
16-
/// Include `_c: Count<Self>` field in important structs to count them.
17-
///
18-
/// To view the counts, run with `RA_COUNT=1`. The overhead of disabled count is
19-
/// almost zero.
20-
pub use countme::Count;
21-
2215
thread_local!(static IN_SCOPE: RefCell<bool> = const { RefCell::new(false) });
2316

2417
/// A wrapper around google_cpu_profiler.

crates/rust-analyzer/src/cli/analysis_stats.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -250,10 +250,6 @@ impl flags::AnalysisStats {
250250
}
251251
report_metric("total memory", total_span.memory.allocated.megabytes() as u64, "MB");
252252

253-
if env::var("RA_COUNT").is_ok() {
254-
eprintln!("{}", profile::countme::get_all());
255-
}
256-
257253
if self.source_stats {
258254
let mut total_file_size = Bytes::default();
259255
for e in ide_db::base_db::ParseQuery.in_db(db).entries::<Vec<_>>() {

0 commit comments

Comments
 (0)