vfs stress: prevent warnings when logging size_t
Thanks @gapry for the observation. Fixes #1868
This commit is contained in:
parent
4506912f6e
commit
81ff63c66b
|
@ -510,7 +510,7 @@ int main()
|
||||||
elapsed_ms = timer.elapsed_ms();
|
elapsed_ms = timer.elapsed_ms();
|
||||||
|
|
||||||
for (size_t i = 0; i < thread_count; ++i) {
|
for (size_t i = 0; i < thread_count; ++i) {
|
||||||
snprintf(path, 3, "/%lu", i);
|
snprintf(path, 3, "/%zu", i);
|
||||||
vfs_root.mkdir(path, 0);
|
vfs_root.mkdir(path, 0);
|
||||||
threads[i] = new (Genode::env()->heap())
|
threads[i] = new (Genode::env()->heap())
|
||||||
Mkdir_thread(vfs_root, path, space.location_of_index(i));
|
Mkdir_thread(vfs_root, path, space.location_of_index(i));
|
||||||
|
@ -524,7 +524,7 @@ int main()
|
||||||
|
|
||||||
vfs_root.sync("/");
|
vfs_root.sync("/");
|
||||||
|
|
||||||
PINF("created %d empty directories, %luμs/op , %luKB consumed",
|
PINF("created %d empty directories, %luμs/op , %zuKB consumed",
|
||||||
count, (elapsed_ms*1000)/count, env()->ram_session()->used()/1024);
|
count, (elapsed_ms*1000)/count, env()->ram_session()->used()/1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -539,7 +539,7 @@ int main()
|
||||||
elapsed_ms = timer.elapsed_ms();
|
elapsed_ms = timer.elapsed_ms();
|
||||||
|
|
||||||
for (size_t i = 0; i < thread_count; ++i) {
|
for (size_t i = 0; i < thread_count; ++i) {
|
||||||
snprintf(path, 3, "/%lu", i);
|
snprintf(path, 3, "/%zu", i);
|
||||||
threads[i] = new (Genode::env()->heap())
|
threads[i] = new (Genode::env()->heap())
|
||||||
Populate_thread(vfs_root, path, space.location_of_index(i));
|
Populate_thread(vfs_root, path, space.location_of_index(i));
|
||||||
}
|
}
|
||||||
|
@ -553,7 +553,7 @@ int main()
|
||||||
|
|
||||||
vfs_root.sync("/");
|
vfs_root.sync("/");
|
||||||
|
|
||||||
PINF("created %d empty files, %luμs/op, %luKB consumed",
|
PINF("created %d empty files, %luμs/op, %zuKB consumed",
|
||||||
count, (elapsed_ms*1000)/count, env()->ram_session()->used()/1024);
|
count, (elapsed_ms*1000)/count, env()->ram_session()->used()/1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -565,7 +565,7 @@ int main()
|
||||||
if (!config()->xml_node().attribute_value("write", true)) {
|
if (!config()->xml_node().attribute_value("write", true)) {
|
||||||
elapsed_ms = timer.elapsed_ms();
|
elapsed_ms = timer.elapsed_ms();
|
||||||
|
|
||||||
PINF("total: %lums, %luK consumed",
|
PINF("total: %lums, %zuK consumed",
|
||||||
elapsed_ms, env()->ram_session()->used()/1024);
|
elapsed_ms, env()->ram_session()->used()/1024);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -577,7 +577,7 @@ int main()
|
||||||
elapsed_ms = timer.elapsed_ms();
|
elapsed_ms = timer.elapsed_ms();
|
||||||
|
|
||||||
for (size_t i = 0; i < thread_count; ++i) {
|
for (size_t i = 0; i < thread_count; ++i) {
|
||||||
snprintf(path, 3, "/%lu", i);
|
snprintf(path, 3, "/%zu", i);
|
||||||
threads[i] = new (Genode::env()->heap())
|
threads[i] = new (Genode::env()->heap())
|
||||||
Write_thread(vfs_root, path, space.location_of_index(i));
|
Write_thread(vfs_root, path, space.location_of_index(i));
|
||||||
}
|
}
|
||||||
|
@ -591,7 +591,7 @@ int main()
|
||||||
|
|
||||||
vfs_root.sync("/");
|
vfs_root.sync("/");
|
||||||
|
|
||||||
PINF("wrote %llu bytes %llukB/s, %luKB consumed",
|
PINF("wrote %llu bytes %llukB/s, %zuKB consumed",
|
||||||
count, count/elapsed_ms, env()->ram_session()->used()/1024);
|
count, count/elapsed_ms, env()->ram_session()->used()/1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -603,7 +603,7 @@ int main()
|
||||||
if (!config()->xml_node().attribute_value("read", true)) {
|
if (!config()->xml_node().attribute_value("read", true)) {
|
||||||
elapsed_ms = timer.elapsed_ms();
|
elapsed_ms = timer.elapsed_ms();
|
||||||
|
|
||||||
PINF("total: %lums, %luKB consumed",
|
PINF("total: %lums, %zuKB consumed",
|
||||||
elapsed_ms, env()->ram_session()->used()/1024);
|
elapsed_ms, env()->ram_session()->used()/1024);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -615,7 +615,7 @@ int main()
|
||||||
elapsed_ms = timer.elapsed_ms();
|
elapsed_ms = timer.elapsed_ms();
|
||||||
|
|
||||||
for (size_t i = 0; i < thread_count; ++i) {
|
for (size_t i = 0; i < thread_count; ++i) {
|
||||||
snprintf(path, 3, "/%lu", i);
|
snprintf(path, 3, "/%zu", i);
|
||||||
threads[i] = new (Genode::env()->heap())
|
threads[i] = new (Genode::env()->heap())
|
||||||
Read_thread(vfs_root, path, space.location_of_index(i));
|
Read_thread(vfs_root, path, space.location_of_index(i));
|
||||||
}
|
}
|
||||||
|
@ -629,7 +629,7 @@ int main()
|
||||||
|
|
||||||
vfs_root.sync("/");
|
vfs_root.sync("/");
|
||||||
|
|
||||||
PINF("read %llu bytes, %llukB/s, %luKB consumed",
|
PINF("read %llu bytes, %llukB/s, %zuKB consumed",
|
||||||
count, count/elapsed_ms, env()->ram_session()->used()/1024);
|
count, count/elapsed_ms, env()->ram_session()->used()/1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -641,7 +641,7 @@ int main()
|
||||||
if (!config()->xml_node().attribute_value("unlink", true)) {
|
if (!config()->xml_node().attribute_value("unlink", true)) {
|
||||||
elapsed_ms = timer.elapsed_ms();
|
elapsed_ms = timer.elapsed_ms();
|
||||||
|
|
||||||
PINF("total: %lums, %luKB consumed",
|
PINF("total: %lums, %zuKB consumed",
|
||||||
elapsed_ms, env()->ram_session()->used()/1024);
|
elapsed_ms, env()->ram_session()->used()/1024);
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
@ -654,7 +654,7 @@ int main()
|
||||||
elapsed_ms = timer.elapsed_ms();
|
elapsed_ms = timer.elapsed_ms();
|
||||||
|
|
||||||
for (size_t i = 0; i < thread_count; ++i) {
|
for (size_t i = 0; i < thread_count; ++i) {
|
||||||
snprintf(path, 3, "/%lu", i);
|
snprintf(path, 3, "/%zu", i);
|
||||||
threads[i] = new (Genode::env()->heap())
|
threads[i] = new (Genode::env()->heap())
|
||||||
Unlink_thread(vfs_root, path, space.location_of_index(i));
|
Unlink_thread(vfs_root, path, space.location_of_index(i));
|
||||||
}
|
}
|
||||||
|
@ -668,19 +668,19 @@ int main()
|
||||||
|
|
||||||
vfs_root.sync("/");
|
vfs_root.sync("/");
|
||||||
|
|
||||||
PINF("unlinked %llu files in %lums, %luKB consumed",
|
PINF("unlinked %llu files in %lums, %zuKB consumed",
|
||||||
count, elapsed_ms, env()->ram_session()->used()/1024);
|
count, elapsed_ms, env()->ram_session()->used()/1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
PINF("total: %lums, %luKB consumed",
|
PINF("total: %lums, %zuKB consumed",
|
||||||
timer.elapsed_ms(), env()->ram_session()->used()/1024);
|
timer.elapsed_ms(), env()->ram_session()->used()/1024);
|
||||||
|
|
||||||
size_t outstanding = env()->ram_session()->used() - initial_consumption;
|
size_t outstanding = env()->ram_session()->used() - initial_consumption;
|
||||||
if (outstanding) {
|
if (outstanding) {
|
||||||
if (outstanding < 1024)
|
if (outstanding < 1024)
|
||||||
PERR("%luB not freed after unlink and sync!", outstanding);
|
PERR("%zuB not freed after unlink and sync!", outstanding);
|
||||||
else
|
else
|
||||||
PERR("%luKB not freed after unlink and sync!", outstanding/1024);
|
PERR("%zuKB not freed after unlink and sync!", outstanding/1024);
|
||||||
}
|
}
|
||||||
|
|
||||||
return 0;
|
return 0;
|
||||||
|
|
Loading…
Reference in New Issue