Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

perf script: Rename perf_evsel__*() operating on 'struct evsel *' to evsel__*()

As those is a 'struct evsel' methods, not part of tools/lib/perf/, aka
libperf, to whom the perf_ prefix belongs.

Cc: Adrian Hunter <adrian.hunter@intel.com>
Cc: Jiri Olsa <jolsa@kernel.org>
Cc: Namhyung Kim <namhyung@kernel.org>
Signed-off-by: Arnaldo Carvalho de Melo <acme@redhat.com>

+19 -34
+19 -34
tools/perf/builtin-script.c
··· 351 351 352 352 #define PRINT_FIELD(x) (output[output_type(attr->type)].fields & PERF_OUTPUT_##x) 353 353 354 - static int perf_evsel__do_check_stype(struct evsel *evsel, 355 - u64 sample_type, const char *sample_msg, 356 - enum perf_output_field field, 357 - bool allow_user_set) 354 + static int evsel__do_check_stype(struct evsel *evsel, u64 sample_type, const char *sample_msg, 355 + enum perf_output_field field, bool allow_user_set) 358 356 { 359 357 struct perf_event_attr *attr = &evsel->core.attr; 360 358 int type = output_type(attr->type); ··· 381 383 return 0; 382 384 } 383 385 384 - static int perf_evsel__check_stype(struct evsel *evsel, 385 - u64 sample_type, const char *sample_msg, 386 - enum perf_output_field field) 386 + static int evsel__check_stype(struct evsel *evsel, u64 sample_type, const char *sample_msg, 387 + enum perf_output_field field) 387 388 { 388 - return perf_evsel__do_check_stype(evsel, sample_type, sample_msg, field, 389 - false); 389 + return evsel__do_check_stype(evsel, sample_type, sample_msg, field, false); 390 390 } 391 391 392 - static int perf_evsel__check_attr(struct evsel *evsel, 393 - struct perf_session *session) 392 + static int perf_evsel__check_attr(struct evsel *evsel, struct perf_session *session) 394 393 { 395 394 struct perf_event_attr *attr = &evsel->core.attr; 396 395 bool allow_user_set; ··· 399 404 HEADER_AUXTRACE); 400 405 401 406 if (PRINT_FIELD(TRACE) && 402 - !perf_session__has_traces(session, "record -R")) 407 + !perf_session__has_traces(session, "record -R")) 403 408 return -EINVAL; 404 409 405 410 if (PRINT_FIELD(IP)) { 406 - if (perf_evsel__check_stype(evsel, PERF_SAMPLE_IP, "IP", 407 - PERF_OUTPUT_IP)) 411 + if (evsel__check_stype(evsel, PERF_SAMPLE_IP, "IP", PERF_OUTPUT_IP)) 408 412 return -EINVAL; 409 413 } 410 414 411 415 if (PRINT_FIELD(ADDR) && 412 - perf_evsel__do_check_stype(evsel, PERF_SAMPLE_ADDR, "ADDR", 413 - PERF_OUTPUT_ADDR, allow_user_set)) 416 + evsel__do_check_stype(evsel, PERF_SAMPLE_ADDR, "ADDR", PERF_OUTPUT_ADDR, allow_user_set)) 414 417 return -EINVAL; 415 418 416 419 if (PRINT_FIELD(DATA_SRC) && 417 - perf_evsel__check_stype(evsel, PERF_SAMPLE_DATA_SRC, "DATA_SRC", 418 - PERF_OUTPUT_DATA_SRC)) 420 + evsel__check_stype(evsel, PERF_SAMPLE_DATA_SRC, "DATA_SRC", PERF_OUTPUT_DATA_SRC)) 419 421 return -EINVAL; 420 422 421 423 if (PRINT_FIELD(WEIGHT) && 422 - perf_evsel__check_stype(evsel, PERF_SAMPLE_WEIGHT, "WEIGHT", 423 - PERF_OUTPUT_WEIGHT)) 424 + evsel__check_stype(evsel, PERF_SAMPLE_WEIGHT, "WEIGHT", PERF_OUTPUT_WEIGHT)) 424 425 return -EINVAL; 425 426 426 427 if (PRINT_FIELD(SYM) && 427 - !(evsel->core.attr.sample_type & (PERF_SAMPLE_IP|PERF_SAMPLE_ADDR))) { 428 + !(evsel->core.attr.sample_type & (PERF_SAMPLE_IP|PERF_SAMPLE_ADDR))) { 428 429 pr_err("Display of symbols requested but neither sample IP nor " 429 430 "sample address\navailable. Hence, no addresses to convert " 430 431 "to symbols.\n"); ··· 432 441 return -EINVAL; 433 442 } 434 443 if (PRINT_FIELD(DSO) && 435 - !(evsel->core.attr.sample_type & (PERF_SAMPLE_IP|PERF_SAMPLE_ADDR))) { 444 + !(evsel->core.attr.sample_type & (PERF_SAMPLE_IP|PERF_SAMPLE_ADDR))) { 436 445 pr_err("Display of DSO requested but no address to convert.\n"); 437 446 return -EINVAL; 438 447 } ··· 449 458 return -EINVAL; 450 459 } 451 460 if ((PRINT_FIELD(PID) || PRINT_FIELD(TID)) && 452 - perf_evsel__check_stype(evsel, PERF_SAMPLE_TID, "TID", 453 - PERF_OUTPUT_TID|PERF_OUTPUT_PID)) 461 + evsel__check_stype(evsel, PERF_SAMPLE_TID, "TID", PERF_OUTPUT_TID|PERF_OUTPUT_PID)) 454 462 return -EINVAL; 455 463 456 464 if (PRINT_FIELD(TIME) && 457 - perf_evsel__check_stype(evsel, PERF_SAMPLE_TIME, "TIME", 458 - PERF_OUTPUT_TIME)) 465 + evsel__check_stype(evsel, PERF_SAMPLE_TIME, "TIME", PERF_OUTPUT_TIME)) 459 466 return -EINVAL; 460 467 461 468 if (PRINT_FIELD(CPU) && 462 - perf_evsel__do_check_stype(evsel, PERF_SAMPLE_CPU, "CPU", 463 - PERF_OUTPUT_CPU, allow_user_set)) 469 + evsel__do_check_stype(evsel, PERF_SAMPLE_CPU, "CPU", PERF_OUTPUT_CPU, allow_user_set)) 464 470 return -EINVAL; 465 471 466 472 if (PRINT_FIELD(IREGS) && 467 - perf_evsel__check_stype(evsel, PERF_SAMPLE_REGS_INTR, "IREGS", 468 - PERF_OUTPUT_IREGS)) 473 + evsel__check_stype(evsel, PERF_SAMPLE_REGS_INTR, "IREGS", PERF_OUTPUT_IREGS)) 469 474 return -EINVAL; 470 475 471 476 if (PRINT_FIELD(UREGS) && 472 - perf_evsel__check_stype(evsel, PERF_SAMPLE_REGS_USER, "UREGS", 473 - PERF_OUTPUT_UREGS)) 477 + evsel__check_stype(evsel, PERF_SAMPLE_REGS_USER, "UREGS", PERF_OUTPUT_UREGS)) 474 478 return -EINVAL; 475 479 476 480 if (PRINT_FIELD(PHYS_ADDR) && 477 - perf_evsel__check_stype(evsel, PERF_SAMPLE_PHYS_ADDR, "PHYS_ADDR", 478 - PERF_OUTPUT_PHYS_ADDR)) 481 + evsel__check_stype(evsel, PERF_SAMPLE_PHYS_ADDR, "PHYS_ADDR", PERF_OUTPUT_PHYS_ADDR)) 479 482 return -EINVAL; 480 483 481 484 return 0;