"Fossies" - the Fresh Open Source Software Archive  

Source code changes of the file "stress-ng.h" 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-ng.h  (stress-ng-0.12.09.tar.xz):stress-ng.h  (stress-ng-0.12.10.tar.xz)
skipping to change at line 1073 skipping to change at line 1073
#define PRIME_64 (0x8f0000000017116dULL) #define PRIME_64 (0x8f0000000017116dULL)
typedef uint32_t stress_class_t; typedef uint32_t stress_class_t;
typedef struct { typedef struct {
void *page_none; /* mmap'd PROT_NONE page */ void *page_none; /* mmap'd PROT_NONE page */
void *page_ro; /* mmap'd PROT_RO page */ void *page_ro; /* mmap'd PROT_RO page */
void *page_wo; /* mmap'd PROT_WO page */ void *page_wo; /* mmap'd PROT_WO page */
} stress_mapped_t; } stress_mapped_t;
#define STRESS_MISC_STATS_MAX (10)
typedef struct {
char description[32];
double value;
} stress_misc_stats_t;
/* stressor args */ /* stressor args */
typedef struct { typedef struct {
uint64_t *counter; /* stressor counter */ uint64_t *counter; /* stressor counter */
bool *counter_ready; /* counter can be read */ bool *counter_ready; /* counter can be read */
const char *name; /* stressor name */ const char *name; /* stressor name */
uint64_t max_ops; /* max number of bogo ops */ uint64_t max_ops; /* max number of bogo ops */
const uint32_t instance; /* stressor instance # */ const uint32_t instance; /* stressor instance # */
const uint32_t num_instances; /* number of instances */ const uint32_t num_instances; /* number of instances */
pid_t pid; /* stressor pid */ pid_t pid; /* stressor pid */
pid_t ppid; /* stressor ppid */ pid_t ppid; /* stressor ppid */
size_t page_size; /* page size */ size_t page_size; /* page size */
stress_mapped_t *mapped; /* mmap'd pages, addr of g_shared mapped */ stress_mapped_t *mapped; /* mmap'd pages, addr of g_shared mapped */
stress_misc_stats_t *misc_stats;/* misc per stressor stats */
} stress_args_t; } stress_args_t;
typedef struct { typedef struct {
const int opt; /* optarg option*/ const int opt; /* optarg option*/
int (*opt_set_func)(const char *opt); /* function to set it */ int (*opt_set_func)(const char *opt); /* function to set it */
} stress_opt_set_func_t; } stress_opt_set_func_t;
/* stressor information */ /* stressor information */
typedef struct { typedef struct {
int (*stressor)(const stress_args_t *args); /* stressor function */ int (*stressor)(const stress_args_t *args); /* stressor function */
skipping to change at line 1271 skipping to change at line 1279
(defined(__clang__) && NEED_CLANG(3, 3, 0)) (defined(__clang__) && NEED_CLANG(3, 3, 0))
#define HOT __attribute__ ((hot)) #define HOT __attribute__ ((hot))
#else #else
#define HOT #define HOT
#endif #endif
/* GCC mlocked data and data section attribute */ /* GCC mlocked data and data section attribute */
#if ((defined(__GNUC__) && NEED_GNUC(4, 6, 0) || \ #if ((defined(__GNUC__) && NEED_GNUC(4, 6, 0) || \
(defined(__clang__) && NEED_CLANG(3, 0, 0)))) && \ (defined(__clang__) && NEED_CLANG(3, 0, 0)))) && \
!defined(__sun__) && \ !defined(__sun__) && \
!defined(__APPLE__) && \
!defined(BUILD_STATIC) !defined(BUILD_STATIC)
#define MLOCKED_TEXT __attribute__((__section__("mlocked_text"))) #define MLOCKED_TEXT __attribute__((__section__("mlocked_text")))
#define MLOCKED_SECTION 1 #define MLOCKED_SECTION 1
#else #else
#define MLOCKED_TEXT #define MLOCKED_TEXT
#endif #endif
/* print format attribute */ /* print format attribute */
#if ((defined(__GNUC__) && NEED_GNUC(3, 2, 0)) || \ #if ((defined(__GNUC__) && NEED_GNUC(3, 2, 0)) || \
(defined(__clang__) && NEED_CLANG(3, 0, 0))) (defined(__clang__) && NEED_CLANG(3, 0, 0)))
skipping to change at line 2308 skipping to change at line 2317
double start; /* wall clock start time */ double start; /* wall clock start time */
double finish; /* wall clock stop time */ double finish; /* wall clock stop time */
#if defined(STRESS_PERF_STATS) #if defined(STRESS_PERF_STATS)
stress_perf_t sp; /* perf counters */ stress_perf_t sp; /* perf counters */
#endif #endif
#if defined(STRESS_THERMAL_ZONES) #if defined(STRESS_THERMAL_ZONES)
stress_tz_t tz; /* thermal zones */ stress_tz_t tz; /* thermal zones */
#endif #endif
bool run_ok; /* true if stressor exited OK */ bool run_ok; /* true if stressor exited OK */
stress_checksum_t *checksum; /* pointer to checksum data */ stress_checksum_t *checksum; /* pointer to checksum data */
stress_misc_stats_t misc_stats[STRESS_MISC_STATS_MAX];
} stress_stats_t; } stress_stats_t;
#define STRESS_WARN_HASH_MAX (128) #define STRESS_WARN_HASH_MAX (128)
/* The stress-ng global shared memory segment */ /* The stress-ng global shared memory segment */
typedef struct { typedef struct {
size_t length; /* Size of segment */ size_t length; /* Size of segment */
uint8_t *mem_cache; /* Shared memory cache */ uint8_t *mem_cache; /* Shared memory cache */
uint64_t mem_cache_size; /* Bytes */ uint64_t mem_cache_size; /* Bytes */
uint16_t mem_cache_level; /* 1=L1, 2=L2, 3=L3 */ uint16_t mem_cache_level; /* 1=L1, 2=L2, 3=L3 */
skipping to change at line 3756 skipping to change at line 3766
extern uint64_t g_opt_timeout; /* timeout in seconds */ extern uint64_t g_opt_timeout; /* timeout in seconds */
extern uint64_t g_opt_flags; /* option flags */ extern uint64_t g_opt_flags; /* option flags */
extern int32_t g_opt_sequential; /* Number of sequential stressors */ extern int32_t g_opt_sequential; /* Number of sequential stressors */
extern int32_t g_opt_parallel; /* Number of parallel stressors */ extern int32_t g_opt_parallel; /* Number of parallel stressors */
extern volatile bool g_keep_stressing_flag; /* false to exit stressor */ extern volatile bool g_keep_stressing_flag; /* false to exit stressor */
extern volatile bool g_caught_sigint; /* true if stopped by SIGINT */ extern volatile bool g_caught_sigint; /* true if stopped by SIGINT */
extern pid_t g_pgrp; /* proceess group leader */ extern pid_t g_pgrp; /* proceess group leader */
extern jmp_buf g_error_env; /* parsing error env */ extern jmp_buf g_error_env; /* parsing error env */
extern stress_put_val_t g_put_val; /* sync data to somewhere */ extern stress_put_val_t g_put_val; /* sync data to somewhere */
static inline bool ALWAYS_INLINE HOT OPTIMIZE3 keep_stressing_flag(void) static inline bool ALWAYS_INLINE OPTIMIZE3 keep_stressing_flag(void)
{ {
return g_keep_stressing_flag; return g_keep_stressing_flag;
} }
static inline void HOT OPTIMIZE3 keep_stressing_set_flag(const bool setting) static inline void OPTIMIZE3 keep_stressing_set_flag(const bool setting)
{ {
g_keep_stressing_flag = setting; g_keep_stressing_flag = setting;
} }
/* /*
* keep_stressing() * keep_stressing()
* returns true if we can keep on running a stressor * returns true if we can keep on running a stressor
*/ */
static inline bool HOT OPTIMIZE3 keep_stressing(const stress_args_t *args) static inline bool OPTIMIZE3 keep_stressing(const stress_args_t *args)
{ {
return (LIKELY(g_keep_stressing_flag) && return (LIKELY(g_keep_stressing_flag) &&
LIKELY(!args->max_ops || (get_counter(args) < args->max_ops))); LIKELY(!args->max_ops || (get_counter(args) < args->max_ops)));
} }
/* /*
* stressor option value handling * stressor option value handling
*/ */
extern int stress_set_setting(const char *name, const stress_type_id_t type_id, extern int stress_set_setting(const char *name, const stress_type_id_t type_id,
const void *value); const void *value);
skipping to change at line 4105 skipping to change at line 4115
extern WARN_UNUSED uint32_t stress_hash_nhash(const char *str); extern WARN_UNUSED uint32_t stress_hash_nhash(const char *str);
extern WARN_UNUSED uint32_t stress_hash_murmur3_32(const uint8_t* key, size_t le n, uint32_t seed); extern WARN_UNUSED uint32_t stress_hash_murmur3_32(const uint8_t* key, size_t le n, uint32_t seed);
extern void stress_dirent_list_free(struct dirent **dlist, const int n); extern void stress_dirent_list_free(struct dirent **dlist, const int n);
extern WARN_UNUSED int stress_dirent_list_prune(struct dirent **dlist, const int n); extern WARN_UNUSED int stress_dirent_list_prune(struct dirent **dlist, const int n);
extern WARN_UNUSED uint16_t stress_ipv4_checksum(uint16_t *ptr, const size_t n); extern WARN_UNUSED uint16_t stress_ipv4_checksum(uint16_t *ptr, const size_t n);
extern int stress_read_fdinfo(const pid_t pid, const int fd); extern int stress_read_fdinfo(const pid_t pid, const int fd);
extern WARN_UNUSED pid_t stress_get_unused_pid_racy(const bool fork_test); extern WARN_UNUSED pid_t stress_get_unused_pid_racy(const bool fork_test);
extern WARN_UNUSED size_t stress_hostname_length(void); extern WARN_UNUSED size_t stress_hostname_length(void);
extern WARN_UNUSED int32_t stress_set_vmstat(const char *const str); extern WARN_UNUSED int32_t stress_set_vmstat(const char *const str);
extern WARN_UNUSED int32_t stress_set_thermalstat(const char *const str); extern WARN_UNUSED int32_t stress_set_thermalstat(const char *const str);
extern void stress_misc_stats_set(stress_misc_stats_t *misc_stats,
const int idx, const char *description, const double value);
extern int stress_ftrace_start(void); extern int stress_ftrace_start(void);
extern int stress_ftrace_stop(void); extern int stress_ftrace_stop(void);
extern void stress_ftrace_free(void); extern void stress_ftrace_free(void);
extern void stress_ftrace_add_pid(const pid_t pid); extern void stress_ftrace_add_pid(const pid_t pid);
/* /*
* Indicate a stress test failed because of limited resources * Indicate a stress test failed because of limited resources
* rather than a failure of the tests during execution. * rather than a failure of the tests during execution.
* err is the errno of the failure. * err is the errno of the failure.
 End of changes. 8 change blocks. 
3 lines changed or deleted 15 lines changed or added

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