Hi Daniel, FYI, the error/warning still remains. tree: https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git master head: 73748627df83aab934c81332ca83a44ab8c7b3e3 commit: bce29ac9ce0bb0b0b146b687ab978378c21e9078 [12896/14055] trace: Add osnoise tracer config: arm64-randconfig-r023-20210629 (attached as .config) compiler: clang version 13.0.0 (https://github.com/llvm/llvm-project aad87328fabff9382bac0b452c83934515e6d0c8) reproduce (this is a W=1 build): wget https://raw.githubusercontent.com/intel/lkp-tests/master/sbin/make.cross -O ~/bin/make.cross chmod +x ~/bin/make.cross # install arm64 cross compiling tool for clang build # apt-get install binutils-aarch64-linux-gnu # https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git/commit/?id=bce29ac9ce0bb0b0b146b687ab978378c21e9078 git remote add linux-next https://git.kernel.org/pub/scm/linux/kernel/git/next/linux-next.git git fetch --no-tags linux-next master git checkout bce29ac9ce0bb0b0b146b687ab978378c21e9078 # save the attached .config to linux build tree COMPILER_INSTALL_PATH=$HOME/0day COMPILER=clang make.cross ARCH=arm64 If you fix the issue, kindly add following tag as appropriate Reported-by: kernel test robot <lkp@xxxxxxxxx> All warnings (new ones prefixed by >>): >> kernel/trace/trace_osnoise.c:438:6: warning: no previous prototype for function 'osnoise_trace_irq_entry' [-Wmissing-prototypes] void osnoise_trace_irq_entry(int id) ^ kernel/trace/trace_osnoise.c:438:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void osnoise_trace_irq_entry(int id) ^ static >> kernel/trace/trace_osnoise.c:461:6: warning: no previous prototype for function 'osnoise_trace_irq_exit' [-Wmissing-prototypes] void osnoise_trace_irq_exit(int id, const char *desc) ^ kernel/trace/trace_osnoise.c:461:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void osnoise_trace_irq_exit(int id, const char *desc) ^ static >> kernel/trace/trace_osnoise.c:520:5: warning: no previous prototype for function 'hook_irq_events' [-Wmissing-prototypes] int hook_irq_events(void) ^ kernel/trace/trace_osnoise.c:520:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int hook_irq_events(void) ^ static >> kernel/trace/trace_osnoise.c:552:6: warning: no previous prototype for function 'unhook_irq_events' [-Wmissing-prototypes] void unhook_irq_events(void) ^ kernel/trace/trace_osnoise.c:552:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void unhook_irq_events(void) ^ static >> kernel/trace/trace_osnoise.c:569:6: warning: no previous prototype for function 'trace_softirq_entry_callback' [-Wmissing-prototypes] void trace_softirq_entry_callback(void *data, unsigned int vec_nr) ^ kernel/trace/trace_osnoise.c:569:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void trace_softirq_entry_callback(void *data, unsigned int vec_nr) ^ static >> kernel/trace/trace_osnoise.c:592:6: warning: no previous prototype for function 'trace_softirq_exit_callback' [-Wmissing-prototypes] void trace_softirq_exit_callback(void *data, unsigned int vec_nr) ^ kernel/trace/trace_osnoise.c:592:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void trace_softirq_exit_callback(void *data, unsigned int vec_nr) ^ static >> kernel/trace/trace_osnoise.c:706:1: warning: no previous prototype for function 'trace_sched_switch_callback' [-Wmissing-prototypes] trace_sched_switch_callback(void *data, bool preempt, struct task_struct *p, ^ kernel/trace/trace_osnoise.c:705:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void ^ static >> kernel/trace/trace_osnoise.c:724:5: warning: no previous prototype for function 'hook_thread_events' [-Wmissing-prototypes] int hook_thread_events(void) ^ kernel/trace/trace_osnoise.c:724:1: note: declare 'static' if the function is not intended to be used outside of this translation unit int hook_thread_events(void) ^ static >> kernel/trace/trace_osnoise.c:741:6: warning: no previous prototype for function 'unhook_thread_events' [-Wmissing-prototypes] void unhook_thread_events(void) ^ kernel/trace/trace_osnoise.c:741:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void unhook_thread_events(void) ^ static >> kernel/trace/trace_osnoise.c:753:6: warning: no previous prototype for function 'save_osn_sample_stats' [-Wmissing-prototypes] void save_osn_sample_stats(struct osnoise_variables *osn_var, struct osnoise_sample *s) ^ kernel/trace/trace_osnoise.c:753:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void save_osn_sample_stats(struct osnoise_variables *osn_var, struct osnoise_sample *s) ^ static >> kernel/trace/trace_osnoise.c:768:6: warning: no previous prototype for function 'diff_osn_sample_stats' [-Wmissing-prototypes] void diff_osn_sample_stats(struct osnoise_variables *osn_var, struct osnoise_sample *s) ^ kernel/trace/trace_osnoise.c:768:1: note: declare 'static' if the function is not intended to be used outside of this translation unit void diff_osn_sample_stats(struct osnoise_variables *osn_var, struct osnoise_sample *s) ^ static 11 warnings generated. vim +/osnoise_trace_irq_entry +438 kernel/trace/trace_osnoise.c 428 429 /* 430 * osnoise_trace_irq_entry - Note the starting of an IRQ 431 * 432 * Save the starting time of an IRQ. As IRQs are non-preemptive to other IRQs, 433 * it is safe to use a single variable (ons_var->irq) to save the statistics. 434 * The arrival_time is used to report... the arrival time. The delta_start 435 * is used to compute the duration at the IRQ exit handler. See 436 * cond_move_irq_delta_start(). 437 */ > 438 void osnoise_trace_irq_entry(int id) 439 { 440 struct osnoise_variables *osn_var = this_cpu_osn_var(); 441 442 if (!osn_var->sampling) 443 return; 444 /* 445 * This value will be used in the report, but not to compute 446 * the execution time, so it is safe to get it unsafe. 447 */ 448 osn_var->irq.arrival_time = time_get(); 449 set_int_safe_time(osn_var, &osn_var->irq.delta_start); 450 osn_var->irq.count++; 451 452 local_inc(&osn_var->int_counter); 453 } 454 455 /* 456 * osnoise_irq_exit - Note the end of an IRQ, sava data and trace 457 * 458 * Computes the duration of the IRQ noise, and trace it. Also discounts the 459 * interference from other sources of noise could be currently being accounted. 460 */ > 461 void osnoise_trace_irq_exit(int id, const char *desc) 462 { 463 struct osnoise_variables *osn_var = this_cpu_osn_var(); 464 int duration; 465 466 if (!osn_var->sampling) 467 return; 468 469 duration = get_int_safe_duration(osn_var, &osn_var->irq.delta_start); 470 trace_irq_noise(id, desc, osn_var->irq.arrival_time, duration); 471 osn_var->irq.arrival_time = 0; 472 cond_move_softirq_delta_start(osn_var, duration); 473 cond_move_thread_delta_start(osn_var, duration); 474 } 475 476 /* 477 * trace_irqentry_callback - Callback to the irq:irq_entry traceevent 478 * 479 * Used to note the starting of an IRQ occurece. 480 */ 481 static void trace_irqentry_callback(void *data, int irq, 482 struct irqaction *action) 483 { 484 osnoise_trace_irq_entry(irq); 485 } 486 487 /* 488 * trace_irqexit_callback - Callback to the irq:irq_exit traceevent 489 * 490 * Used to note the end of an IRQ occurece. 491 */ 492 static void trace_irqexit_callback(void *data, int irq, 493 struct irqaction *action, int ret) 494 { 495 osnoise_trace_irq_exit(irq, action->name); 496 } 497 498 /* 499 * arch specific register function. 500 */ 501 int __weak osnoise_arch_register(void) 502 { 503 return 0; 504 } 505 506 /* 507 * arch specific unregister function. 508 */ 509 void __weak osnoise_arch_unregister(void) 510 { 511 return; 512 } 513 514 /* 515 * hook_irq_events - Hook IRQ handling events 516 * 517 * This function hooks the IRQ related callbacks to the respective trace 518 * events. 519 */ > 520 int hook_irq_events(void) 521 { 522 int ret; 523 524 ret = register_trace_irq_handler_entry(trace_irqentry_callback, NULL); 525 if (ret) 526 goto out_err; 527 528 ret = register_trace_irq_handler_exit(trace_irqexit_callback, NULL); 529 if (ret) 530 goto out_unregister_entry; 531 532 ret = osnoise_arch_register(); 533 if (ret) 534 goto out_irq_exit; 535 536 return 0; 537 538 out_irq_exit: 539 unregister_trace_irq_handler_exit(trace_irqexit_callback, NULL); 540 out_unregister_entry: 541 unregister_trace_irq_handler_entry(trace_irqentry_callback, NULL); 542 out_err: 543 return -EINVAL; 544 } 545 546 /* 547 * unhook_irq_events - Unhook IRQ handling events 548 * 549 * This function unhooks the IRQ related callbacks to the respective trace 550 * events. 551 */ > 552 void unhook_irq_events(void) 553 { 554 osnoise_arch_unregister(); 555 unregister_trace_irq_handler_exit(trace_irqexit_callback, NULL); 556 unregister_trace_irq_handler_entry(trace_irqentry_callback, NULL); 557 } 558 559 #ifndef CONFIG_PREEMPT_RT 560 /* 561 * trace_softirq_entry_callback - Note the starting of a softirq 562 * 563 * Save the starting time of a softirq. As softirqs are non-preemptive to 564 * other softirqs, it is safe to use a single variable (ons_var->softirq) 565 * to save the statistics. The arrival_time is used to report... the 566 * arrival time. The delta_start is used to compute the duration at the 567 * softirq exit handler. See cond_move_softirq_delta_start(). 568 */ > 569 void trace_softirq_entry_callback(void *data, unsigned int vec_nr) 570 { 571 struct osnoise_variables *osn_var = this_cpu_osn_var(); 572 573 if (!osn_var->sampling) 574 return; 575 /* 576 * This value will be used in the report, but not to compute 577 * the execution time, so it is safe to get it unsafe. 578 */ 579 osn_var->softirq.arrival_time = time_get(); 580 set_int_safe_time(osn_var, &osn_var->softirq.delta_start); 581 osn_var->softirq.count++; 582 583 local_inc(&osn_var->int_counter); 584 } 585 586 /* 587 * trace_softirq_exit_callback - Note the end of an softirq 588 * 589 * Computes the duration of the softirq noise, and trace it. Also discounts the 590 * interference from other sources of noise could be currently being accounted. 591 */ > 592 void trace_softirq_exit_callback(void *data, unsigned int vec_nr) 593 { 594 struct osnoise_variables *osn_var = this_cpu_osn_var(); 595 int duration; 596 597 if (!osn_var->sampling) 598 return; 599 600 duration = get_int_safe_duration(osn_var, &osn_var->softirq.delta_start); 601 trace_softirq_noise(vec_nr, osn_var->softirq.arrival_time, duration); 602 cond_move_thread_delta_start(osn_var, duration); 603 osn_var->softirq.arrival_time = 0; 604 } 605 --- 0-DAY CI Kernel Test Service, Intel Corporation https://lists.01.org/hyperkitty/list/kbuild-all@xxxxxxxxxxxx
Attachment:
.config.gz
Description: application/gzip