"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "stress-vdso.c" between
stress-ng-0.12.09.tar.xz and stress-ng-0.12.10.tar.xz

About: stress-ng will stress test a computer system in various selectable ways. It was designed to exercise various physical subsystems of a computer as well as the various operating system kernel interfaces.

stress-vdso.c  (stress-ng-0.12.09.tar.xz):stress-vdso.c  (stress-ng-0.12.10.tar.xz)
skipping to change at line 452 skipping to change at line 452
return 0; return 0;
} }
/* /*
* stress_vdso() * stress_vdso()
* stress system wraps in vDSO * stress system wraps in vDSO
*/ */
static int stress_vdso(const stress_args_t *args) static int stress_vdso(const stress_args_t *args)
{ {
char *str; char *str;
double t1, t2, t3, overhead_ns; double t1, t2, t3, dt, overhead_ns;
uint64_t counter; uint64_t counter;
if (!vdso_sym_list) { if (!vdso_sym_list) {
/* Should not fail, but worth checking to avoid breakage */ /* Should not fail, but worth checking to avoid breakage */
if (args->instance == 0) if (args->instance == 0)
pr_inf("%s: could not find any vDSO functions, skipping\n ", pr_inf("%s: could not find any vDSO functions, skipping\n ",
args->name); args->name);
return EXIT_NOT_IMPLEMENTED; return EXIT_NOT_IMPLEMENTED;
} }
vdso_sym_list_remove_duplicates(&vdso_sym_list); vdso_sym_list_remove_duplicates(&vdso_sym_list);
skipping to change at line 508 skipping to change at line 508
vdso_sym->dummy_func(vdso_sym->addr); vdso_sym->dummy_func(vdso_sym->addr);
inc_counter(args); inc_counter(args);
} }
} }
t3 = stress_time_now(); t3 = stress_time_now();
} while (t3 - t2 < 0.1); } while (t3 - t2 < 0.1);
overhead_ns = (double)STRESS_NANOSECOND * ((t3 - t2) / (double)(get_count er(args) - counter)); overhead_ns = (double)STRESS_NANOSECOND * ((t3 - t2) / (double)(get_count er(args) - counter));
set_counter(args, counter); set_counter(args, counter);
pr_inf("%s: %.2f nanoseconds per call (excluding %.2f nanoseconds test ov dt = t2 - t1;
erhead)\n", if (dt > 0.0) {
args->name, const double ns = ((dt * (double)STRESS_NANOSECOND) / (double)cou
((t2 - t1) * (double)STRESS_NANOSECOND) / (double)counter, nter) - overhead_ns;
overhead_ns);
pr_inf("%s: %.2f nanoseconds per call (excluding %.2f nanoseconds
test overhead)\n",
args->name, ns, overhead_ns);
stress_misc_stats_set(args->misc_stats, 0, "nanoseconds per call"
, ns);
}
stress_set_proc_state(args->name, STRESS_STATE_DEINIT); stress_set_proc_state(args->name, STRESS_STATE_DEINIT);
vdso_sym_list_free(&vdso_sym_list); vdso_sym_list_free(&vdso_sym_list);
return EXIT_SUCCESS; return EXIT_SUCCESS;
} }
stressor_info_t stress_vdso_info = { stressor_info_t stress_vdso_info = {
.stressor = stress_vdso, .stressor = stress_vdso,
 End of changes. 2 change blocks. 
6 lines changed or deleted 12 lines changed or added

Home  |  About  |  Features  |  All  |  Newest  |  Dox  |  Diffs  |  RSS Feeds  |  Screenshots  |  Comments  |  Imprint  |  Privacy  |  HTTP(S)