libc: io: remove verbose log messages

This commit is contained in:
2026-05-30 10:06:58 +01:00
parent 07a1d579ca
commit aaea926f4d
2 changed files with 0 additions and 33 deletions
-10
View File
@@ -22,7 +22,6 @@ static long clear_buf(struct __opaque_file *f)
static long refill_buf(struct __opaque_file *f) static long refill_buf(struct __opaque_file *f)
{ {
kern_tracef("refill");
char *buf = NULL; char *buf = NULL;
size_t available = 0; size_t available = 0;
long r = 0; long r = 0;
@@ -108,7 +107,6 @@ void __libc_file_lock(struct __opaque_file *f)
{ {
kern_futex_t expected = 0; kern_futex_t expected = 0;
while (1) { while (1) {
kern_tracef("lock=%u (%p)", f->f_lock, f);
expected = 0; expected = 0;
if (__atomic_compare_exchange_n( if (__atomic_compare_exchange_n(
&f->f_lock, &f->f_lock,
@@ -117,11 +115,9 @@ void __libc_file_lock(struct __opaque_file *f)
0, 0,
__ATOMIC_ACQUIRE, __ATOMIC_ACQUIRE,
__ATOMIC_ACQUIRE)) { __ATOMIC_ACQUIRE)) {
kern_tracef("locked=%u (%p)", f->f_lock, f);
return; return;
} }
kern_tracef("wait=%u (%p)", expected, f);
futex_wait(&f->f_lock, 1, FUTEX_PRIVATE); futex_wait(&f->f_lock, 1, FUTEX_PRIVATE);
} }
} }
@@ -130,12 +126,10 @@ void __libc_file_unlock(struct __opaque_file *f)
{ {
f->f_lock = 0; f->f_lock = 0;
futex_wake(&f->f_lock, 1, FUTEX_PRIVATE); futex_wake(&f->f_lock, 1, FUTEX_PRIVATE);
kern_tracef("unlocked=%u (%p)", f->f_lock, f);
} }
static long read_buf(struct __opaque_file *f, void *out, size_t count) static long read_buf(struct __opaque_file *f, void *out, size_t count)
{ {
kern_tracef("read_buf(%p, %zu)", out, count);
char *dest = out; char *dest = out;
size_t nr_read = 0; size_t nr_read = 0;
long r = 0; long r = 0;
@@ -168,7 +162,6 @@ static long read_buf(struct __opaque_file *f, void *out, size_t count)
static long read_nobuf(struct __opaque_file *f, void *out, size_t count) static long read_nobuf(struct __opaque_file *f, void *out, size_t count)
{ {
kern_tracef("read_nobuf");
return read(f->f_fd, out, count); return read(f->f_fd, out, count);
} }
@@ -286,9 +279,6 @@ static long write_nobuf(struct __opaque_file *f, const void *out, size_t count)
long __libc_file_write(struct __opaque_file *f, const void *buf, size_t count) long __libc_file_write(struct __opaque_file *f, const void *buf, size_t count)
{ {
if (f->f_lock != 1) {
kern_tracef("file is not locked!!!");
}
long ret = 0; long ret = 0;
if (f->f_prev != OP_WRITE) { if (f->f_prev != OP_WRITE) {
ret = clear_buf(f); ret = clear_buf(f);
-23
View File
@@ -45,13 +45,6 @@ int __libc_ringbuf_get_read_buffer(
contiguous_capacity = buf->buf_writep - buf->buf_readp; contiguous_capacity = buf->buf_writep - buf->buf_readp;
} }
kern_tracef(
"OPEN READ: readp=%zu, writep=%zu, max=%zu -> %p cap=%zu",
buf->buf_readp,
buf->buf_writep,
buf->buf_max,
buf->buf_ptr + buf->buf_readp,
contiguous_capacity);
*out_len = contiguous_capacity; *out_len = contiguous_capacity;
if (contiguous_capacity == 0) { if (contiguous_capacity == 0) {
@@ -74,8 +67,6 @@ void __libc_ringbuf_put_read_buffer(
buf->buf_readp = buf->buf_writep = 0; buf->buf_readp = buf->buf_writep = 0;
} }
kern_tracef("CLOSE READ: %p r=%zu", *bufp, *len);
*bufp = NULL; *bufp = NULL;
*len = 0; *len = 0;
} }
@@ -101,14 +92,6 @@ int __libc_ringbuf_get_write_buffer(
contiguous_capacity = buf->buf_readp - buf->buf_writep - 1; contiguous_capacity = buf->buf_readp - buf->buf_writep - 1;
} }
kern_tracef(
"OPEN WRITE: readp=%zu, writep=%zu, max=%zu -> %p cap=%zu",
buf->buf_readp,
buf->buf_writep,
buf->buf_max,
buf->buf_ptr + buf->buf_readp,
contiguous_capacity);
*out_len = contiguous_capacity; *out_len = contiguous_capacity;
if (contiguous_capacity == 0) { if (contiguous_capacity == 0) {
@@ -131,12 +114,6 @@ void __libc_ringbuf_put_write_buffer(
buf->buf_readp = buf->buf_writep = 0; buf->buf_readp = buf->buf_writep = 0;
} }
kern_tracef(
"CLOSE WRITE: %p r=%zu (%c)",
*bufp,
*len,
*(char *)(*bufp));
*bufp = NULL; *bufp = NULL;
*len = 0; *len = 0;
} }