@@ -131,32 +131,6 @@ impl SelfProfilerRef {
131131 } )
132132 }
133133
134- /// Start profiling a generic activity. Profiling continues until
135- /// `generic_activity_end` is called. The RAII-based `generic_activity`
136- /// usually is the better alternative.
137- #[ inline( always) ]
138- pub fn generic_activity_start ( & self , event_id : & str ) {
139- self . non_guard_generic_event (
140- |profiler| profiler. generic_activity_event_kind ,
141- |profiler| profiler. profiler . alloc_string ( event_id) ,
142- EventFilter :: GENERIC_ACTIVITIES ,
143- TimestampKind :: Start ,
144- ) ;
145- }
146-
147- /// End profiling a generic activity that was started with
148- /// `generic_activity_start`. The RAII-based `generic_activity` usually is
149- /// the better alternative.
150- #[ inline( always) ]
151- pub fn generic_activity_end ( & self , event_id : & str ) {
152- self . non_guard_generic_event (
153- |profiler| profiler. generic_activity_event_kind ,
154- |profiler| profiler. profiler . alloc_string ( event_id) ,
155- EventFilter :: GENERIC_ACTIVITIES ,
156- TimestampKind :: End ,
157- ) ;
158- }
159-
160134 /// Start profiling a query provider. Profiling continues until the
161135 /// TimingGuard returned from this call is dropped.
162136 #[ inline( always) ]
@@ -238,28 +212,6 @@ impl SelfProfilerRef {
238212 TimingGuard :: none ( )
239213 } ) ) ;
240214 }
241-
242- #[ inline( always) ]
243- fn non_guard_generic_event < F : FnOnce ( & SelfProfiler ) -> StringId > (
244- & self ,
245- event_kind : fn ( & SelfProfiler ) -> StringId ,
246- event_id : F ,
247- event_filter : EventFilter ,
248- timestamp_kind : TimestampKind
249- ) {
250- drop ( self . exec ( event_filter, |profiler| {
251- let thread_id = thread_id_to_u64 ( std:: thread:: current ( ) . id ( ) ) ;
252-
253- profiler. profiler . record_event (
254- event_kind ( profiler) ,
255- event_id ( profiler) ,
256- thread_id,
257- timestamp_kind,
258- ) ;
259-
260- TimingGuard :: none ( )
261- } ) ) ;
262- }
263215}
264216
265217pub struct SelfProfiler {
0 commit comments