@@ -316,48 +316,6 @@ struct evsel *evsel__new_idx(struct perf_event_attr *attr, int idx)
316316 return evsel ;
317317}
318318
319- static bool perf_event_can_profile_kernel (void )
320- {
321- return perf_event_paranoid_check (1 );
322- }
323-
324- struct evsel * evsel__new_cycles (bool precise __maybe_unused , __u32 type , __u64 config )
325- {
326- struct perf_event_attr attr = {
327- .type = type ,
328- .config = config ,
329- .exclude_kernel = !perf_event_can_profile_kernel (),
330- };
331- struct evsel * evsel ;
332-
333- event_attr_init (& attr );
334-
335- /*
336- * Now let the usual logic to set up the perf_event_attr defaults
337- * to kick in when we return and before perf_evsel__open() is called.
338- */
339- evsel = evsel__new (& attr );
340- if (evsel == NULL )
341- goto out ;
342-
343- arch_evsel__fixup_new_cycles (& evsel -> core .attr );
344-
345- evsel -> precise_max = true;
346-
347- /* use asprintf() because free(evsel) assumes name is allocated */
348- if (asprintf (& evsel -> name , "cycles%s%s%.*s" ,
349- (attr .precise_ip || attr .exclude_kernel ) ? ":" : "" ,
350- attr .exclude_kernel ? "u" : "" ,
351- attr .precise_ip ? attr .precise_ip + 1 : 0 , "ppp" ) < 0 )
352- goto error_free ;
353- out :
354- return evsel ;
355- error_free :
356- evsel__delete (evsel );
357- evsel = NULL ;
358- goto out ;
359- }
360-
361319int copy_config_terms (struct list_head * dst , struct list_head * src )
362320{
363321 struct evsel_config_term * pos , * tmp ;
@@ -1131,10 +1089,6 @@ void __weak arch_evsel__set_sample_weight(struct evsel *evsel)
11311089 evsel__set_sample_bit (evsel , WEIGHT );
11321090}
11331091
1134- void __weak arch_evsel__fixup_new_cycles (struct perf_event_attr * attr __maybe_unused )
1135- {
1136- }
1137-
11381092void __weak arch__post_evsel_config (struct evsel * evsel __maybe_unused ,
11391093 struct perf_event_attr * attr __maybe_unused )
11401094{
0 commit comments