system profiler: revert use of BytePointer.
This went through review way too fast once again. I did warn that these changes were completely untested, and indeed this one was broken. Be very careful when pressing the submit button, please! Change-Id: I6e0230efe94830033f5427451f67fe6ce29a28e6 Reviewed-on: https://review.haiku-os.org/c/1184 Reviewed-by: waddlesplash <waddlesplash@gmail.com>
This commit is contained in:
parent
6ff7e25bd0
commit
fb7498fe2e
@ -7,7 +7,6 @@
|
||||
#include <system_profiler.h>
|
||||
|
||||
#include <AutoDeleter.h>
|
||||
#include <BytePointer.h>
|
||||
#include <Referenceable.h>
|
||||
|
||||
#include <util/AutoLock.h>
|
||||
@ -1339,8 +1338,8 @@ SystemProfiler::_AllocateBuffer(size_t size, int event, int cpu, int count)
|
||||
// Buffer is wrapped or needs wrapping.
|
||||
if (end < fBufferCapacity) {
|
||||
// not wrapped yet, but needed
|
||||
BytePointer<system_profiler_event_header> header(
|
||||
fBufferBase + end);
|
||||
system_profiler_event_header* header
|
||||
= (system_profiler_event_header*)(fBufferBase + end);
|
||||
header->event = B_SYSTEM_PROFILER_BUFFER_END;
|
||||
fBufferSize = fBufferCapacity - fBufferStart;
|
||||
end = 0;
|
||||
@ -1353,7 +1352,8 @@ SystemProfiler::_AllocateBuffer(size_t size, int event, int cpu, int count)
|
||||
}
|
||||
}
|
||||
|
||||
BytePointer<system_profiler_event_header> header(fBufferBase + end);
|
||||
system_profiler_event_header* header
|
||||
= (system_profiler_event_header*)(fBufferBase + end);
|
||||
header->event = event;
|
||||
header->cpu = cpu;
|
||||
header->size = size - sizeof(system_profiler_event_header);
|
||||
|
Loading…
Reference in New Issue
Block a user