|
|
|
@ -11,7 +11,7 @@ |
|
|
|
|
|
|
|
|
|
#include "selfdrive/common/clutil.h" |
|
|
|
|
#include "selfdrive/common/timing.h" |
|
|
|
|
|
|
|
|
|
#include "selfdrive/common/util.h" |
|
|
|
|
//#define RUN_DISASSEMBLER
|
|
|
|
|
//#define RUN_OPTIMIZER
|
|
|
|
|
|
|
|
|
@ -21,14 +21,10 @@ map<pair<cl_kernel, int>, string> g_args; |
|
|
|
|
map<pair<cl_kernel, int>, int> g_args_size; |
|
|
|
|
map<cl_program, string> g_program_source; |
|
|
|
|
|
|
|
|
|
void hexdump(uint32_t *d, int len) { |
|
|
|
|
void hexdump(uint8_t *d, int len) { |
|
|
|
|
assert((len%4) == 0); |
|
|
|
|
printf(" dumping %p len 0x%x\n", d, len); |
|
|
|
|
for (int i = 0; i < len/4; i++) { |
|
|
|
|
if (i != 0 && (i%0x10) == 0) printf("\n"); |
|
|
|
|
printf("%8x ", d[i]); |
|
|
|
|
} |
|
|
|
|
printf("\n"); |
|
|
|
|
printf("%s\n", util::hexdump(d, len).c_str()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
// *********** ioctl interceptor ***********
|
|
|
|
@ -94,10 +90,10 @@ int ioctl(int filedes, unsigned long request, void *argp) { |
|
|
|
|
struct kgsl_device_getproperty *prop = (struct kgsl_device_getproperty *)argp; |
|
|
|
|
printf("IOCTL_KGSL_SETPROPERTY: 0x%x sizebytes:%zu\n", prop->type, prop->sizebytes); |
|
|
|
|
if (thneed->record & THNEED_VERBOSE_DEBUG) { |
|
|
|
|
hexdump((uint32_t *)prop->value, prop->sizebytes); |
|
|
|
|
hexdump((uint8_t *)prop->value, prop->sizebytes); |
|
|
|
|
if (prop->type == KGSL_PROP_PWR_CONSTRAINT) { |
|
|
|
|
struct kgsl_device_constraint *constraint = (struct kgsl_device_constraint *)prop->value; |
|
|
|
|
hexdump((uint32_t *)constraint->data, constraint->size); |
|
|
|
|
hexdump((uint8_t *)constraint->data, constraint->size); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|