Skip to content

Commit d56ba88

Browse files
committed
Remove log-events
1 parent 3477168 commit d56ba88

File tree

9 files changed

+0
-258
lines changed

9 files changed

+0
-258
lines changed

.travis.yml

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,6 @@ os:
99
- linux
1010
script:
1111
- cargo build
12-
- cargo test
13-
- cargo test --features log-events
1412
- "if [ $TRAVIS_RUST_VERSION = nightly ]; then cargo test --features unstable; fi"
1513
- cargo test
1614
- "cd string-cache-codegen/ && cargo build && cd .."
17-
- "cd examples/event-log/ && cargo build && cd ../.."
18-
- "cd examples/summarize-events/ && cargo build && cd ../.."

Cargo.toml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
[package]
2-
32
name = "string_cache"
43
version = "0.7.4" # Also update README.md when making a semver-breaking change
54
authors = [ "The Servo Project Developers" ]
@@ -19,11 +18,6 @@ build = "build.rs"
1918
name = "string_cache"
2019

2120
[features]
22-
23-
# Enable event logging for generating benchmark traces.
24-
# See examples/event-log.
25-
log-events = []
26-
2721
# Use unstable features to optimize space and time (memory and CPU usage).
2822
unstable = []
2923

examples/event-log/Cargo.toml

Lines changed: 0 additions & 9 deletions
This file was deleted.

examples/event-log/README.md

Lines changed: 0 additions & 4 deletions
This file was deleted.

examples/event-log/src/main.rs

Lines changed: 0 additions & 33 deletions
This file was deleted.

examples/summarize-events/Cargo.toml

Lines changed: 0 additions & 13 deletions
This file was deleted.

examples/summarize-events/src/main.rs

Lines changed: 0 additions & 170 deletions
This file was deleted.

src/atom.rs

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -29,12 +29,6 @@ use shared::{STATIC_TAG, INLINE_TAG, DYNAMIC_TAG, TAG_MASK, MAX_INLINE_LEN, STAT
2929
ENTRY_ALIGNMENT, pack_static};
3030
use self::UnpackedAtom::{Dynamic, Inline, Static};
3131

32-
#[cfg(feature = "log-events")]
33-
use event::Event;
34-
35-
#[cfg(not(feature = "log-events"))]
36-
macro_rules! log (($e:expr) => (()));
37-
3832
const NB_BUCKETS: usize = 1 << 12; // 4096
3933
const BUCKET_MASK: u64 = (1 << 12) - 1;
4034

@@ -101,16 +95,10 @@ impl StringCache {
10195
}
10296
debug_assert!(mem::align_of::<StringCacheEntry>() >= ENTRY_ALIGNMENT);
10397
let string = string.into_owned();
104-
let _string_clone = if cfg!(feature = "log-events") {
105-
string.clone()
106-
} else {
107-
"".to_owned()
108-
};
10998
let mut entry = Box::new(StringCacheEntry::new(
11099
self.buckets[bucket_index].take(), hash, string));
111100
let ptr: *mut StringCacheEntry = &mut *entry;
112101
self.buckets[bucket_index] = Some(entry);
113-
log!(Event::Insert(ptr as u64, _string_clone));
114102

115103
ptr
116104
}
@@ -137,8 +125,6 @@ impl StringCache {
137125
}
138126
current = unsafe { &mut (*entry_ptr).next_in_bucket };
139127
}
140-
141-
log!(Event::Remove(key));
142128
}
143129
}
144130

@@ -355,7 +341,6 @@ impl<'a, Static: StaticAtomSet> From<Cow<'a, str>> for Atom<Static> {
355341
};
356342

357343
let data = unsafe { unpacked.pack() };
358-
log!(Event::Intern(data));
359344
Atom { unsafe_data: data, phantom: PhantomData }
360345
}
361346
}

src/lib.rs

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -118,10 +118,6 @@ extern crate string_cache_shared as shared;
118118

119119
pub use atom::{Atom, StaticAtomSet, PhfStrSet, EmptyStaticAtomSet, DefaultAtom};
120120

121-
#[cfg(feature = "log-events")]
122-
#[macro_use]
123-
pub mod event;
124-
125121
pub mod atom;
126122

127123
// Make test_atom! macro work in this crate.

0 commit comments

Comments
 (0)