Append function name/offset to kernel warning signature.
The current crash reporter signature for a kernel warning is the 8-digit hex hash for the warning. For convenience, add the function name + offset to the hash, when it is available. BUG=chromium:328948 TEST=ran unit test Change-Id: I8f047497c0556227a1dbdf650dabcd4c51aa8340 Reviewed-on: https://chromium-review.googlesource.com/180320 Tested-by: Luigi Semenzato <semenzato@chromium.org> Reviewed-by: Sameer Nanda <snanda@chromium.org> Commit-Queue: Luigi Semenzato <semenzato@chromium.org>
This commit is contained in:
parent
f4c39b09f4
commit
a59b3df60a
|
@ -124,6 +124,7 @@ static void SetHashSeen(uint32_t hash) {
|
|||
|
||||
int WarnStart(void) {
|
||||
uint32_t hash;
|
||||
char *spacep;
|
||||
|
||||
if (filter)
|
||||
return 1;
|
||||
|
@ -139,7 +140,10 @@ int WarnStart(void) {
|
|||
yyout = fopen(warn_dump_path, "w");
|
||||
if (yyout == NULL)
|
||||
Die("fopen %s failed: %s\n", warn_dump_path, strerror(errno));
|
||||
fprintf(yyout, "%08x\n", hash);
|
||||
spacep = index(yytext, ' ');
|
||||
if (spacep == NULL || spacep[1] == '\0')
|
||||
spacep = "unknown-function";
|
||||
fprintf(yyout, "%08x-%s\n", hash, spacep + 1);
|
||||
return 1;
|
||||
}
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ check_log() {
|
|||
fail "expected ${n_expected} lines in ${TESTLOG}, found this instead:
|
||||
$(<"${TESTLOG}")"
|
||||
fi
|
||||
if egrep -qv '^[0-9a-f]{8}$' "${TESTLOG}"; then
|
||||
if egrep -qv '^[0-9a-f]{8}' "${TESTLOG}"; then
|
||||
fail "found bad lines in ${TESTLOG}:
|
||||
$(<"${TESTLOG}")"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue