Skip to content

Commit 20dc1b6

Browse files
committed
Drop unused profile things
1 parent faa13cb commit 20dc1b6

File tree

7 files changed

+0
-33
lines changed

7 files changed

+0
-33
lines changed

src/tools/rust-analyzer/Cargo.lock

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -221,11 +221,6 @@ name = "countme"
221221
version = "3.0.1"
222222
source = "registry+https://github.com/rust-lang/crates.io-index"
223223
checksum = "7704b5fdd17b18ae31c4c1da5a2e0305a2bf17b5249300a9ee9ed7b72114c636"
224-
dependencies = [
225-
"dashmap",
226-
"once_cell",
227-
"rustc-hash",
228-
]
229224

230225
[[package]]
231226
name = "cov-mark"
@@ -548,7 +543,6 @@ dependencies = [
548543
"limit",
549544
"mbe",
550545
"once_cell",
551-
"profile",
552546
"ra-ap-rustc_abi",
553547
"ra-ap-rustc_parse_format",
554548
"rustc-hash",
@@ -1400,13 +1394,9 @@ name = "profile"
14001394
version = "0.0.0"
14011395
dependencies = [
14021396
"cfg-if",
1403-
"countme",
1404-
"la-arena 0.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
14051397
"libc",
1406-
"once_cell",
14071398
"perf-event",
14081399
"tikv-jemalloc-ctl",
1409-
"tracing",
14101400
"windows-sys 0.52.0",
14111401
]
14121402

src/tools/rust-analyzer/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

src/tools/rust-analyzer/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,

src/tools/rust-analyzer/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)));

src/tools/rust-analyzer/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]

src/tools/rust-analyzer/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.

src/tools/rust-analyzer/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)