[ox] Cleanup some messy trace points
This commit is contained in:
parent
55a4f2451e
commit
2ebce7713d
@ -122,10 +122,10 @@ Result<FileStat> PassThroughFS::stat(const char *path) {
|
|||||||
const auto p = m_path / stripSlash(path);
|
const auto p = m_path / stripSlash(path);
|
||||||
uint8_t type = std::filesystem::is_directory(p, ec) ?
|
uint8_t type = std::filesystem::is_directory(p, ec) ?
|
||||||
FileType_Directory : FileType_NormalFile;
|
FileType_Directory : FileType_NormalFile;
|
||||||
oxTrace("PassThroughFS::stat") << ec.message().c_str() << path;
|
oxTrace("ox::fs::PassThroughFS::stat") << ec.message().c_str() << path;
|
||||||
uint64_t size = type == FileType_Directory ? 0 : std::filesystem::file_size(p, ec);
|
uint64_t size = type == FileType_Directory ? 0 : std::filesystem::file_size(p, ec);
|
||||||
oxTrace("PassThroughFS::stat") << ec.message().c_str() << path;
|
oxTrace("ox::fs::PassThroughFS::stat") << ec.message().c_str() << path;
|
||||||
oxTrace("PassThroughFS::stat::size") << path << size;
|
oxTrace("ox::fs::PassThroughFS::stat::size") << path << size;
|
||||||
return {{0, 0, size, type}, OxError(ec.value())};
|
return {{0, 0, size, type}, OxError(ec.value())};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
8
deps/ox/src/ox/ptrarith/nodebuffer.hpp
vendored
8
deps/ox/src/ox/ptrarith/nodebuffer.hpp
vendored
@ -278,9 +278,7 @@ typename NodeBuffer<size_t, Item>::ItemPtr NodeBuffer<size_t, Item>::malloc(size
|
|||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
oxTrace("ox::ptrarith::NodeBuffer::malloc") << "buffer size:" << m_header.size
|
oxTracef("ox::ptrarith::NodeBuffer::malloc", "buffer size: {}; addr: {}; fullSize: {}", m_header.size.get(), addr, fullSize);
|
||||||
<< ";addr:" << addr
|
|
||||||
<< ";fullSize:" << fullSize;
|
|
||||||
auto out = ItemPtr(this, m_header.size, addr, fullSize);
|
auto out = ItemPtr(this, m_header.size, addr, fullSize);
|
||||||
if (!out.valid()) {
|
if (!out.valid()) {
|
||||||
oxTrace("ox::ptrarith::NodeBuffer::malloc::fail") << "Unknown";
|
oxTrace("ox::ptrarith::NodeBuffer::malloc::fail") << "Unknown";
|
||||||
@ -352,10 +350,10 @@ Error NodeBuffer<size_t, Item>::free(ItemPtr item) {
|
|||||||
|
|
||||||
template<typename size_t, typename Item>
|
template<typename size_t, typename Item>
|
||||||
Error NodeBuffer<size_t, Item>::setSize(size_t size) {
|
Error NodeBuffer<size_t, Item>::setSize(size_t size) {
|
||||||
oxTrace("ox::ptrarith::NodeBuffer::setSize") << m_header.size << "to" << size;
|
oxTracef("ox::ptrarith::NodeBuffer::setSize", "{} to {}", m_header.size.get(), size);
|
||||||
auto last = lastItem();
|
auto last = lastItem();
|
||||||
auto end = last.valid() ? last.end() : sizeof(m_header);
|
auto end = last.valid() ? last.end() : sizeof(m_header);
|
||||||
oxTrace("ox::ptrarith::NodeBuffer::setSize") << "end:" << end;
|
oxTracef("ox::ptrarith::NodeBuffer::setSize", "end: {}", end);
|
||||||
if (end > size) {
|
if (end > size) {
|
||||||
// resizing to less than buffer size
|
// resizing to less than buffer size
|
||||||
return OxError(1);
|
return OxError(1);
|
||||||
|
Loading…
Reference in New Issue
Block a user