Consistently use fbt_excluded() on all architectures.

MFC after:	2 weeks
This commit is contained in:
Mark Johnston 2016-12-10 03:11:05 +00:00
parent 02315a6759
commit 8bb9b7f17a
3 changed files with 10 additions and 32 deletions

View File

@ -95,16 +95,8 @@ fbt_provide_module_function(linker_file_t lf, int symindx,
uint32_t *instr, *limit; uint32_t *instr, *limit;
int popm; int popm;
if (strncmp(name, "dtrace_", 7) == 0 && if (fbt_excluded(name))
strncmp(name, "dtrace_safe_", 12) != 0) {
/*
* Anything beginning with "dtrace_" may be called
* from probe context unless it explicitly indicates
* that it won't be called from probe context by
* using the prefix "dtrace_safe_".
*/
return (0); return (0);
}
instr = (uint32_t *)symval->value; instr = (uint32_t *)symval->value;
limit = (uint32_t *)(symval->value + symval->size); limit = (uint32_t *)(symval->value + symval->size);

View File

@ -127,16 +127,8 @@ fbt_provide_module_function(linker_file_t lf, int symindx,
return (0); return (0);
#endif #endif
if (strncmp(name, "dtrace_", 7) == 0 && if (fbt_excluded(name) == 0)
strncmp(name, "dtrace_safe_", 12) != 0) {
/*
* Anything beginning with "dtrace_" may be called
* from probe context unless it explicitly indicates
* that it won't be called from probe context by
* using the prefix "dtrace_safe_".
*/
return (0); return (0);
}
instr = (uint32_t *) symval->value; instr = (uint32_t *) symval->value;
limit = (uint32_t *) (symval->value + symval->size); limit = (uint32_t *) (symval->value + symval->size);

View File

@ -158,21 +158,15 @@ fbt_provide_module_function(linker_file_t lf, int symindx,
int size; int size;
uint8_t *instr, *limit; uint8_t *instr, *limit;
if ((strncmp(name, "dtrace_", 7) == 0 && if (fbt_excluded(name))
strncmp(name, "dtrace_safe_", 12) != 0) || return (0);
strcmp(name, "trap_check") == 0) {
/* /*
* Anything beginning with "dtrace_" may be called * trap_check() is a wrapper for DTrace's fault handler, so we don't
* from probe context unless it explicitly indicates * want to be able to instrument it.
* that it won't be called from probe context by */
* using the prefix "dtrace_safe_". if (strcmp(name, "trap_check") == 0)
*
* Additionally, we avoid instrumenting trap_check() to avoid
* the possibility of generating a fault in probe context before
* DTrace's fault handler is called.
*/
return (0); return (0);
}
size = symval->size; size = symval->size;