diff options
Diffstat (limited to 'src/gui/seqmanager/SegmentMmapper.cpp')
-rw-r--r-- | src/gui/seqmanager/SegmentMmapper.cpp | 34 |
1 files changed, 17 insertions, 17 deletions
diff --git a/src/gui/seqmanager/SegmentMmapper.cpp b/src/gui/seqmanager/SegmentMmapper.cpp index 29fe715..8cebe8d 100644 --- a/src/gui/seqmanager/SegmentMmapper.cpp +++ b/src/gui/seqmanager/SegmentMmapper.cpp @@ -60,7 +60,7 @@ SegmentMmapper::SegmentMmapper(RosegardenGUIDoc* doc, m_mmappedRegion(0), m_mmappedEventBuffer((MappedEvent*)0) { - SETQMAN_DEBUG << "SegmentMmapper : " << this + SEQMAN_DEBUG << "SegmentMmapper : " << this << " trying to mmap " << m_fileName << endl; @@ -68,12 +68,12 @@ SegmentMmapper::SegmentMmapper(RosegardenGUIDoc* doc, S_IRUSR | S_IWUSR); if (m_fd < 0) { perror("SegmentMmapper::SegmentMmapper: Failed to open mmap file for writing"); - SETQMAN_DEBUG << "SegmentMmapper : Couldn't open " << m_fileName + SEQMAN_DEBUG << "SegmentMmapper : Couldn't open " << m_fileName << endl; throw Exception("Couldn't open " + qstrtostr(m_fileName)); } - // SETQMAN_DEBUG << "SegmentMmapper : mmap size = " << m_mmappedSize + // SEQMAN_DEBUG << "SegmentMmapper : mmap size = " << m_mmappedSize // << endl; } @@ -86,18 +86,18 @@ void SegmentMmapper::init() doMmap(); dump(); if (m_segment != 0) { - SETQMAN_DEBUG << "SegmentMmapper::init : mmap size = " << m_mmappedSize + SEQMAN_DEBUG << "SegmentMmapper::init : mmap size = " << m_mmappedSize << " for segment " << m_segment->getLabel() << endl; } } else { - SETQMAN_DEBUG << "SegmentMmapper::init : mmap size = 0 - skipping mmapping for now\n"; + SEQMAN_DEBUG << "SegmentMmapper::init : mmap size = 0 - skipping mmapping for now\n"; } } SegmentMmapper::~SegmentMmapper() { - SETQMAN_DEBUG << "~SegmentMmapper : " << this + SEQMAN_DEBUG << "~SegmentMmapper : " << this << " unmapping " << (void*)m_mmappedRegion << " of size " << m_mmappedSize << endl; @@ -106,7 +106,7 @@ SegmentMmapper::~SegmentMmapper() ::munmap(m_mmappedRegion, m_mmappedSize); ::close(m_fd); - SETQMAN_DEBUG << "~SegmentMmapper : removing " << m_fileName << endl; + SEQMAN_DEBUG << "~SegmentMmapper : removing " << m_fileName << endl; TQFile::remove (m_fileName); @@ -118,7 +118,7 @@ bool SegmentMmapper::refresh() size_t newMmappedSize = computeMmappedSize() + sizeof(size_t); - SETQMAN_DEBUG << "SegmentMmapper::refresh() - " << getFileName() + SEQMAN_DEBUG << "SegmentMmapper::refresh() - " << getFileName() << " - m_mmappedRegion = " << (void*)m_mmappedRegion << " - m_mmappedEventBuffer = " << (void*)m_mmappedEventBuffer << " - new size = " << newMmappedSize @@ -157,7 +157,7 @@ bool SegmentMmapper::refresh() void SegmentMmapper::setFileSize(size_t size) { - SETQMAN_DEBUG << "SegmentMmapper::setFileSize() : setting size of " + SEQMAN_DEBUG << "SegmentMmapper::setFileSize() : setting size of " << m_fileName << " to " << size << " - current size = " << m_mmappedSize << endl; @@ -173,7 +173,7 @@ void SegmentMmapper::setFileSize(size_t size) // so go the safe way if (size == 0) { - SETQMAN_DEBUG << "SegmentMmapper : size == 0 : no resize to do\n"; + SEQMAN_DEBUG << "SegmentMmapper : size == 0 : no resize to do\n"; return ; } @@ -203,13 +203,13 @@ void SegmentMmapper::setFileSize(size_t size) void SegmentMmapper::remap(size_t newsize) { - SETQMAN_DEBUG << "SegmentMmapper : remapping " << m_fileName + SEQMAN_DEBUG << "SegmentMmapper : remapping " << m_fileName << " from size " << m_mmappedSize << " to size " << newsize << endl; if (!m_mmappedRegion) { // nothing to mremap, just mmap - SETQMAN_DEBUG << "SegmentMmapper : nothing to remap - mmap instead\n"; + SEQMAN_DEBUG << "SegmentMmapper : nothing to remap - mmap instead\n"; m_mmappedSize = newsize; doMmap(); @@ -222,7 +222,7 @@ void SegmentMmapper::remap(size_t newsize) m_mmappedEventBuffer = (MappedEvent *)((size_t *)m_mmappedRegion + 1); if (m_mmappedRegion != oldBuffer) { - SETQMAN_DEBUG << "NOTE: buffer moved from " << oldBuffer << + SEQMAN_DEBUG << "NOTE: buffer moved from " << oldBuffer << " to " << (void *)m_mmappedRegion << endl; } #else @@ -234,7 +234,7 @@ void SegmentMmapper::remap(size_t newsize) #endif if (m_mmappedRegion == (void*) - 1) { - SETQMAN_DEBUG << TQString("mremap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); + SEQMAN_DEBUG << TQString("mremap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); throw Exception("mremap failed"); } @@ -253,11 +253,11 @@ void SegmentMmapper::doMmap() m_mmappedEventBuffer = (MappedEvent *)((size_t *)m_mmappedRegion + 1); if (m_mmappedRegion == (void*) - 1) { - SETQMAN_DEBUG << TQString("mmap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); + SEQMAN_DEBUG << TQString("mmap failed : (%1) %2\n").arg(errno).arg(strerror(errno)); throw Exception("mmap failed"); } - SETQMAN_DEBUG << "SegmentMmapper::doMmap() - mmap size : " << m_mmappedSize + SEQMAN_DEBUG << "SegmentMmapper::doMmap() - mmap size : " << m_mmappedSize << " at " << (void*)m_mmappedRegion << endl; } @@ -401,7 +401,7 @@ void SegmentMmapper::dump() ++bufPos; } catch (...) { - SETQMAN_DEBUG << "SegmentMmapper::dump - caught exception while trying to create MappedEvent\n"; + SEQMAN_DEBUG << "SegmentMmapper::dump - caught exception while trying to create MappedEvent\n"; } } } |