提交 b1c4f1f8 编写于 作者: hm12299's avatar hm12299

add syscall_count

上级 37907e4d
{"rustc_fingerprint":14933657470109532446,"outputs":{"5747014971574785997":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/chenzhiyang/.rustup/toolchains/nightly-2021-01-30-aarch64-apple-darwin\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"crc\"\ntarget_feature=\"crypto\"\ntarget_feature=\"fp\"\ntarget_feature=\"fp16\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rdm\"\ntarget_feature=\"v8.1a\"\ntarget_feature=\"v8.2a\"\ntarget_feature=\"v8.3a\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"128\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"128\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"apple\"\nunix\n",""],"4476964694761187371":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/chenzhiyang/.rustup/toolchains/nightly-2021-01-30-aarch64-apple-darwin\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"crc\"\ntarget_feature=\"crypto\"\ntarget_feature=\"fp\"\ntarget_feature=\"fp16\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rdm\"\ntarget_feature=\"v8.1a\"\ntarget_feature=\"v8.2a\"\ntarget_feature=\"v8.3a\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"128\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"128\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"apple\"\nunix\n",""],"13789308117277828956":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/chenzhiyang/.rustup/toolchains/nightly-2021-01-30-aarch64-apple-darwin\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"crc\"\ntarget_feature=\"crypto\"\ntarget_feature=\"fp\"\ntarget_feature=\"fp16\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rdm\"\ntarget_feature=\"v8.1a\"\ntarget_feature=\"v8.2a\"\ntarget_feature=\"v8.3a\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"128\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"128\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"apple\"\nunix\n",""],"1164083562126845933":["rustc 1.51.0-nightly (b12290861 2021-01-29)\nbinary: rustc\ncommit-hash: b122908617436af187252572ed5db96850551380\ncommit-date: 2021-01-29\nhost: aarch64-apple-darwin\nrelease: 1.51.0-nightly\nLLVM version: 11.0.1\n",""]},"successes":{}}
\ No newline at end of file
{"rustc_fingerprint":9680999004345779706,"outputs":{"1164083562126845933":["rustc 1.51.0-nightly (b12290861 2021-01-29)\nbinary: rustc\ncommit-hash: b122908617436af187252572ed5db96850551380\ncommit-date: 2021-01-29\nhost: x86_64-unknown-linux-gnu\nrelease: 1.51.0-nightly\nLLVM version: 11.0.1\n",""],"4476964694761187371":["___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/hm/.rustup/toolchains/nightly-2021-01-30-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n",""],"13789308117277828956":["___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/hm/.rustup/toolchains/nightly-2021-01-30-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n",""],"2196823701345282402":["___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/hm/.rustup/toolchains/nightly-2021-01-30-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n",""]},"successes":{}}
\ No newline at end of file
use super::File;
use alloc::{sync::Arc, vec::Vec};
use alloc::string::{String, ToString};
use crate::task::SyscallCount;
use spin::Mutex;
use crate::mm::{
UserBuffer,
};
......@@ -10,13 +12,14 @@ use super::TaskStatus;
#[repr(C)]
pub struct ProcInfo{
// name:
pub pid:usize,
pub pid: usize,
pub name: String,
//pub ppid:usize,
pub ppid: isize,
// heap_sz:
// mem:
// cpu_time:
pub cpu_time: usize,
pub status:TaskStatus,
pub syscall_cnt: Arc<Mutex<SyscallCount>>,
}
......
......@@ -4,24 +4,29 @@ use crate::mm::{
translated_refmut,
translated_str,
};
use crate::timer::get_time_ms;
use crate::task::{current_user_token, current_task};
use crate::fs::{make_pipe, OpenFlags, open_file};
use alloc::sync::Arc;
pub fn sys_write(fd: usize, buf: *const u8, len: usize) -> isize {
let start_time = get_time_ms();
let token = current_user_token();
let task = current_task().unwrap();
let inner = task.acquire_inner_lock();
let mut syscall_inner = inner.syscall.lock();
if fd >= inner.fd_table.len() {
return -1;
}
if let Some(file) = &inner.fd_table[fd] {
syscall_inner.syscall_write.0 += 1;
if !file.writable() {
return -1;
}
let file = file.clone();
// release Task lock manually to avoid deadlock
drop(inner);
syscall_inner.syscall_write.1 += get_time_ms() - start_time;
drop(syscall_inner);
file.write(
UserBuffer::new(translated_byte_buffer(token, buf, len))
) as isize
......@@ -31,19 +36,23 @@ pub fn sys_write(fd: usize, buf: *const u8, len: usize) -> isize {
}
pub fn sys_read(fd: usize, buf: *const u8, len: usize) -> isize {
let start_time = 0;
let token = current_user_token();
let task = current_task().unwrap();
let inner = task.acquire_inner_lock();
let mut syscall_inner = inner.syscall.lock();
if fd >= inner.fd_table.len() {
return -1;
}
if let Some(file) = &inner.fd_table[fd] {
syscall_inner.syscall_read.0 += 1;
let file = file.clone();
if !file.readable() {
return -1;
}
// release Task lock manually to avoid deadlock
drop(inner);
syscall_inner.syscall_read.1 += get_time_ms() - start_time;
drop(syscall_inner);
file.read(
UserBuffer::new(translated_byte_buffer(token, buf, len))
) as isize
......@@ -53,6 +62,7 @@ pub fn sys_read(fd: usize, buf: *const u8, len: usize) -> isize {
}
pub fn sys_open(path: *const u8, flags: u32) -> isize {
let start_time = 0;
let task = current_task().unwrap();
let token = current_user_token();
let path = translated_str(token, path);
......@@ -62,7 +72,9 @@ pub fn sys_open(path: *const u8, flags: u32) -> isize {
) {
let mut inner = task.acquire_inner_lock();
let fd = inner.alloc_fd();
inner.fd_table[fd] = Some(inode);
inner.fd_table[fd] = Some(inode);let mut syscall_inner = inner.syscall.lock();
syscall_inner.syscall_open.0 += 1;
syscall_inner.syscall_open.1 += get_time_ms() - start_time;
fd as isize
} else {
-1
......@@ -70,6 +82,7 @@ pub fn sys_open(path: *const u8, flags: u32) -> isize {
}
pub fn sys_close(fd: usize) -> isize {
let start_time = get_time_ms();
let task = current_task().unwrap();
let mut inner = task.acquire_inner_lock();
if fd >= inner.fd_table.len() {
......@@ -79,10 +92,14 @@ pub fn sys_close(fd: usize) -> isize {
return -1;
}
inner.fd_table[fd].take();
let mut syscall_inner = inner.syscall.lock();
syscall_inner.syscall_close.0 += 1;
syscall_inner.syscall_close.1 += get_time_ms() - start_time;
0
}
pub fn sys_pipe(pipe: *mut usize) -> isize {
let start_time = get_time_ms();
let task = current_task().unwrap();
let token = current_user_token();
let mut inner = task.acquire_inner_lock();
......@@ -93,10 +110,14 @@ pub fn sys_pipe(pipe: *mut usize) -> isize {
inner.fd_table[write_fd] = Some(pipe_write);
*translated_refmut(token, pipe) = read_fd;
*translated_refmut(token, unsafe { pipe.add(1) }) = write_fd;
let mut syscall_inner = inner.syscall.lock();
syscall_inner.syscall_pipe.0 += 1;
syscall_inner.syscall_pipe.1 += get_time_ms() - start_time;
0
}
pub fn sys_dup(fd: usize) -> isize {
let start_time = get_time_ms();
let task = current_task().unwrap();
let mut inner = task.acquire_inner_lock();
if fd >= inner.fd_table.len() {
......@@ -107,5 +128,8 @@ pub fn sys_dup(fd: usize) -> isize {
}
let new_fd = inner.alloc_fd();
inner.fd_table[new_fd] = Some(Arc::clone(inner.fd_table[fd].as_ref().unwrap()));
let mut syscall_inner = inner.syscall.lock();
syscall_inner.syscall_dup.0 += 1;
syscall_inner.syscall_dup.1 += get_time_ms() - start_time;
new_fd as isize
}
\ No newline at end of file
......@@ -7,7 +7,7 @@ use crate::task::{
get_info,
TaskStatus,
};
use crate::timer::get_time_ms;
use crate::timer::{get_time, get_time_ms};
use crate::mm::{
translated_str,
translated_refmut,
......@@ -27,19 +27,37 @@ pub fn sys_exit(exit_code: i32) -> ! {
}
pub fn sys_yield() -> isize {
let start_time = get_time_ms();
suspend_current_and_run_next();
let current_task = current_task().unwrap();
let inner = current_task.acquire_inner_lock();
let mut syscall_inner = inner.syscall.lock();
syscall_inner.syscall_yield.0 += 1;
syscall_inner.syscall_yield.1 += get_time_ms() - start_time;
0
}
pub fn sys_get_time() -> isize {
let current_task = current_task().unwrap();
let inner = current_task.acquire_inner_lock();
let mut syscall_inner = inner.syscall.lock();
syscall_inner.syscall_get_time.0 += 1;
get_time_ms() as isize
}
pub fn sys_getpid() -> isize {
current_task().unwrap().pid.0 as isize
let start_time = get_time_ms();
let current_task = current_task().unwrap();
let x = current_task.pid.0 as isize;
let inner = current_task.acquire_inner_lock();
let mut syscall_inner = inner.syscall.lock();
syscall_inner.syscall_getpid.0 += 1;
syscall_inner.syscall_getpid.1 += get_time_ms() - start_time;
x
}
pub fn sys_fork() -> isize {
let start_time = get_time_ms();
let current_task = current_task().unwrap();
let new_task = current_task.fork();
let new_pid = new_task.pid.0;
......@@ -49,11 +67,16 @@ pub fn sys_fork() -> isize {
// for child process, fork returns 0
trap_cx.x[10] = 0;
// add new task to scheduler
add_task(new_task);
add_task(new_task);
let inner = current_task.acquire_inner_lock();
let mut syscall_inner = inner.syscall.lock();
syscall_inner.syscall_fork.0 += 1;
syscall_inner.syscall_fork.1 += get_time_ms() - start_time;
new_pid as isize
}
pub fn sys_exec(path: *const u8, mut args: *const usize) -> isize {
let start_time = get_time_ms();
let token = current_user_token();
let path = translated_str(token, path);
let mut args_vec: Vec<String> = Vec::new();
......@@ -70,8 +93,12 @@ pub fn sys_exec(path: *const u8, mut args: *const usize) -> isize {
let task = current_task().unwrap();
let argc = args_vec.len();
task.set_name(path);
println!("testttttttttttttt3");
task.exec(all_data.as_slice(), args_vec);
let current_task = current_task().unwrap();
let inner = current_task.acquire_inner_lock();
let mut syscall_inner = inner.syscall.lock();
syscall_inner.syscall_exec.0 += 1;
syscall_inner.syscall_exec.1 += get_time_ms() - start_time;
// return argc because cx.x[10] will be covered with it later
argc as isize
} else {
......@@ -82,15 +109,68 @@ pub fn sys_exec(path: *const u8, mut args: *const usize) -> isize {
pub fn sys_proc_monitor() -> isize{
let x = get_info();
let proc_stat= x.0;
println!("Process | pid | ppid | heap | mem | cpu time ");
println!("Process | pid | ppid | heap | mem | cpu time | syscall | times | duration ");
for i in 0..x.1{
if proc_stat[i].status == TaskStatus::Zombie {
continue;
}
//println!("{} ", proc_stat[i].name);
print!("{} ", proc_stat[i].name);
println!("{} ", proc_stat[i].pid);
print!("{:<15}{:<8}{}\n{:<69}", proc_stat[i].name, proc_stat[i].pid, proc_stat[i].ppid, " ");
let sycall_cnt = proc_stat[i].syscall_cnt.lock();
if sycall_cnt.syscall_dup.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_DUP", sycall_cnt.syscall_dup.0, sycall_cnt.syscall_dup.1);
print!("\n{:<69}", "");
}
if sycall_cnt.syscall_open.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_OPEN", sycall_cnt.syscall_open.0, sycall_cnt.syscall_open.1);
print!("\n{:<69}", "");
}
if sycall_cnt.syscall_close.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_CLOSE",sycall_cnt.syscall_close.0, sycall_cnt.syscall_close.1);
print!("\n{:<69}", "");
}
if sycall_cnt.syscall_pipe.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_PIPE",sycall_cnt.syscall_pipe.0, sycall_cnt.syscall_pipe.1);
print!("\n{:<69}", "");
}
if sycall_cnt.syscall_read.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_READ",sycall_cnt.syscall_read.0, sycall_cnt.syscall_read.1);
print!("\n{:<69}", "");
}
if sycall_cnt.syscall_write.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_WRITE",sycall_cnt.syscall_write.0, sycall_cnt.syscall_write.1);
print!("\n{:<69}", "");
}
if sycall_cnt.syscall_exit.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_EXIT",sycall_cnt.syscall_exit.0, sycall_cnt.syscall_exit.1);
print!("\n{:<69}", "");
}
if sycall_cnt.syscall_yield.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_YIELD",sycall_cnt.syscall_yield.0, sycall_cnt.syscall_yield.1);
print!("\n{:<69}", "");
}
if sycall_cnt.syscall_get_time.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_GET_TIME",sycall_cnt.syscall_get_time.0, sycall_cnt.syscall_get_time.1);
print!("\n{:<69}", "");
}
if sycall_cnt.syscall_getpid.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_GETPID",sycall_cnt.syscall_getpid.0, sycall_cnt.syscall_getpid.1);
print!("\n{:<69}", "");
}
if sycall_cnt.syscall_fork.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_FORK",sycall_cnt.syscall_fork.0, sycall_cnt.syscall_fork.1);
print!("\n{:<69}", "");
}
if sycall_cnt.syscall_exec.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_EXEC",sycall_cnt.syscall_exec.0, sycall_cnt.syscall_exec.1);
print!("\n{:<69}", "");
}
if sycall_cnt.syscall_waitpid.0 != 0{
print!("{:<18}{:^4} {}ms","SYSCALL_WAITPID",sycall_cnt.syscall_waitpid.0, sycall_cnt.syscall_waitpid.1);
print!("\n{:<69}", "");
}
println!("");
//println!("{} ", proc_stat[i].total_size);
//println!("{} ", proc_stat[i].cpu_time);
......@@ -106,6 +186,7 @@ pub fn sys_proc_monitor() -> isize{
/// If there is not a child process whose pid is same as given, return -1.
/// Else if there is a child process but it is still running, return -2.
pub fn sys_waitpid(pid: isize, exit_code_ptr: *mut i32) -> isize {
let start_time = get_time_ms();
let task = current_task().unwrap();
// find a child process
......@@ -135,6 +216,11 @@ pub fn sys_waitpid(pid: isize, exit_code_ptr: *mut i32) -> isize {
let exit_code = child.acquire_inner_lock().exit_code;
// ++++ release child PCB lock
*translated_refmut(inner.memory_set.token(), exit_code_ptr) = exit_code;
let current_task = current_task().unwrap();
let inner = current_task.acquire_inner_lock();
let mut syscall_inner = inner.syscall.lock();
syscall_inner.syscall_waitpid.0 += 1;
syscall_inner.syscall_waitpid.1 += get_time_ms() - start_time;
found_pid as isize
} else {
-2
......
......@@ -6,8 +6,9 @@ mod processor;
mod pid;
pub use crate::fs::{open_file, OpenFlags, ProcInfo};
use crate::timer::get_time_ms;
use switch::__switch;
use task::{TaskControlBlock};
pub use task::{TaskControlBlock, SyscallCount};
pub use task::TaskStatus;
use alloc::sync::Arc;
use manager::fetch_task;
......@@ -34,13 +35,20 @@ pub fn suspend_current_and_run_next() {
let task_cx_ptr2 = task_inner.get_task_cx_ptr2();
// Change status to Ready
task_inner.task_status = TaskStatus::Ready;
let start_time = get_time_ms();
drop(task_inner);
// ---- release current PCB lock
// push back to ready queue.
add_task(task);
// jump to scheduling cycle
schedule(task_cx_ptr2);
//task_inner.cpu_time += get_time_ms() - start_time;
}
pub fn exit_current_and_run_next(exit_code: i32) {
......
......@@ -33,7 +33,7 @@ impl Processor {
&inner.idle_task_cx_ptr as *const usize
}
pub fn run(&self) {
println!("run");
//println!("run");
loop {
if let Some(task) = fetch_task() {
......@@ -41,16 +41,17 @@ impl Processor {
// acquire
let mut task_inner = task.acquire_inner_lock();
let next_task_cx_ptr2 = task_inner.get_task_cx_ptr2();
//task_inner.start_time = get_time_ms();
task_inner.task_status = TaskStatus::Running;
//println!("{}",task.pid.0);
drop(task_inner);
// release
self.inner.borrow_mut().current = Some(task);
self.inner.borrow_mut().current.as_ref().unwrap().acquire_inner_lock().stamp();
let start_time = get_time_ms();
//let mut task_inner = self.inner.borrow().current.unwrap().acquire_inner_lock();
//let inner_lock = self.inner.borrow_mut().current.as_ref().unwrap().acquire_inner_lock();
//let _ = inner_lock.stamp();
unsafe {
__switch(
idle_task_cx_ptr2,
......@@ -58,9 +59,7 @@ impl Processor {
);
}
//czy
self.inner.borrow_mut().current.as_ref().unwrap().acquire_inner_lock().cpu_time_update();
//task_inner.cpu_time += get_time_ms() - start_time;
}
}
......
......@@ -5,7 +5,7 @@ use crate::mm::{
VirtAddr,
translated_refmut,
};
use crate::timer::get_time_ms;
//use crate::timer::get_time_ms;
use crate::trap::{TrapContext, trap_handler};
use crate::config::{TRAP_CONTEXT};
use super::TaskContext;
......@@ -16,6 +16,22 @@ use alloc::vec::Vec;
use alloc::string::{String, ToString};
use spin::{Mutex, MutexGuard};
use crate::fs::{File, ProcInfo, Stdin, Stdout};
#[derive(Copy, Clone)]
pub struct SyscallCount{
pub syscall_dup: (usize, usize),
pub syscall_open: (usize, usize),
pub syscall_close: (usize, usize),
pub syscall_pipe: (usize, usize),
pub syscall_read: (usize, usize),
pub syscall_write: (usize, usize),
pub syscall_exit: (usize, usize),
pub syscall_yield: (usize, usize),
pub syscall_get_time: (usize, usize),
pub syscall_getpid: (usize, usize),
pub syscall_fork: (usize, usize),
pub syscall_exec: (usize, usize),
pub syscall_waitpid: (usize, usize),
}
pub struct TaskControlBlock {
// immutable
......@@ -23,6 +39,7 @@ pub struct TaskControlBlock {
pub kernel_stack: KernelStack,
// mutable
inner: Mutex<TaskControlBlockInner>,
pub ppid: isize,
}
pub struct TaskControlBlockInner {
......@@ -36,9 +53,9 @@ pub struct TaskControlBlockInner {
pub children: Vec<Arc<TaskControlBlock>>,
pub exit_code: i32,
pub fd_table: Vec<Option<Arc<dyn File + Send + Sync>>>,
//czy
pub start_time: usize,
pub cpu_time: usize,
pub start_run_stamp: usize,
pub syscall: Arc<Mutex<SyscallCount>>,
}
impl TaskControlBlockInner {
......@@ -51,7 +68,7 @@ impl TaskControlBlockInner {
pub fn get_user_token(&self) -> usize {
self.memory_set.token()
}
fn get_status(&self) -> TaskStatus {
pub fn get_status(&self) -> TaskStatus {
self.task_status
}
pub fn is_zombie(&self) -> bool {
......@@ -66,24 +83,29 @@ impl TaskControlBlockInner {
self.fd_table.len() - 1
}
}
pub fn stamp(&mut self){
/*pub fn stamp(&mut self){
self.start_run_stamp = get_time_ms();
}
pub fn cpu_time_update(&mut self){
self.cpu_time += get_time_ms()-self.start_run_stamp;
}
}*/
}
impl TaskControlBlock {
pub fn get_info(&self)-> ProcInfo{
let pid = self.getpid();
// TODO this_info.ppid = self.inner.lock().parent;
let status = self.inner.lock().get_status();
let name = self.get_name();
let ppid = self.get_ppid();
let cpu_time = self.get_cpu_time();
let syscall_cnt = self.get_syscall_cnt();
ProcInfo{
pid,
name,
status,
ppid,
cpu_time,
syscall_cnt,
}
}
......@@ -112,6 +134,7 @@ impl TaskControlBlock {
let task_control_block = Self {
pid: pid_handle,
kernel_stack,
ppid: -1,
inner: Mutex::new(TaskControlBlockInner {
trap_cx_ppn,
base_size: user_sp,
......@@ -133,10 +156,24 @@ impl TaskControlBlock {
// 注意调用号严格来说不是自己分配的,打开一个新文件默认分配能分配的最小调用号
// Some(Arc::new(ProcInfoList)),
],
// czy
cpu_time:0,
// czy
start_run_stamp:0,
start_time: 0,
cpu_time: 0,
syscall: Arc::new(Mutex::new(SyscallCount{
syscall_dup: (0, 0),
syscall_open: (0, 0),
syscall_close: (0, 0),
syscall_pipe: (0, 0),
syscall_read: (0, 0),
syscall_write: (0, 0),
syscall_exit: (0, 0),
syscall_yield: (0, 0),
syscall_get_time: (0, 0),
syscall_getpid: (0, 0),
syscall_fork: (0, 0),
syscall_exec: (0, 0),
syscall_waitpid: (0, 0),
}))
//start_run_stamp:0,
}),
};
// prepare TrapContext in user space
......@@ -228,9 +265,11 @@ impl TaskControlBlock {
}
}
let name = parent_inner.name.clone();
let ppid = self.pid.0 as isize;
let task_control_block = Arc::new(TaskControlBlock {
pid: pid_handle,
kernel_stack,
ppid,
inner: Mutex::new(TaskControlBlockInner {
trap_cx_ppn,
base_size: parent_inner.base_size,
......@@ -242,10 +281,27 @@ impl TaskControlBlock {
children: Vec::new(),
exit_code: 0,
fd_table: new_fd_table,
start_time: 0,
cpu_time: 0,
syscall: Arc::new(Mutex::new(SyscallCount{
syscall_dup: (0, 0),
syscall_open: (0, 0),
syscall_close: (0, 0),
syscall_pipe: (0, 0),
syscall_read: (0, 0),
syscall_write: (0, 0),
syscall_exit: (0, 0),
syscall_yield: (0, 0),
syscall_get_time: (0, 0),
syscall_getpid: (0, 0),
syscall_fork: (0, 0),
syscall_exec: (0, 0),
syscall_waitpid: (0, 0),
}))
// czy
cpu_time:0,
//cpu_time:0,
// czy
start_run_stamp:0,
//start_run_stamp:0,
}),
});
// add child
......@@ -262,8 +318,13 @@ impl TaskControlBlock {
pub fn getpid(&self) -> usize {
self.pid.0
}
pub fn getppid(&self) -> usize{
self.acquire_inner_lock().parent.as_ref().unwrap().upgrade().unwrap().getpid()
pub fn get_ppid(&self) -> isize{
self.ppid
}
pub fn get_cpu_time(&self) -> usize{
self.acquire_inner_lock().cpu_time
}
pub fn get_name(&self) -> String{
......@@ -271,6 +332,11 @@ impl TaskControlBlock {
temp1.name.clone()
}
pub fn get_syscall_cnt(&self) -> Arc<Mutex<SyscallCount>>{
Arc::clone(&self.acquire_inner_lock().syscall)
}
}
#[derive(Copy, Clone, PartialEq)]
......
{"rustc_fingerprint":14933657470109532446,"outputs":{"3451674829631148818":["___\nlib___.rlib\nlib___.a\n/Users/chenzhiyang/.rustup/toolchains/nightly-2021-01-30-aarch64-apple-darwin\ndebug_assertions\npanic=\"abort\"\nproc_macro\ntarget_arch=\"riscv64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_feature=\"a\"\ntarget_feature=\"c\"\ntarget_feature=\"d\"\ntarget_feature=\"f\"\ntarget_feature=\"m\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"none\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\n","warning: dropping unsupported crate type `dylib` for target `riscv64gc-unknown-none-elf`\n\nwarning: dropping unsupported crate type `cdylib` for target `riscv64gc-unknown-none-elf`\n\nwarning: dropping unsupported crate type `proc-macro` for target `riscv64gc-unknown-none-elf`\n\nwarning: 3 warnings emitted\n\n"],"4014748978772980884":["___\nlib___.rlib\nlib___.a\n/Users/chenzhiyang/.rustup/toolchains/nightly-2021-01-30-aarch64-apple-darwin\ndebug_assertions\npanic=\"abort\"\nproc_macro\ntarget_arch=\"riscv64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_feature=\"a\"\ntarget_feature=\"c\"\ntarget_feature=\"d\"\ntarget_feature=\"f\"\ntarget_feature=\"m\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"none\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\n","warning: dropping unsupported crate type `dylib` for target `riscv64gc-unknown-none-elf`\n\nwarning: dropping unsupported crate type `cdylib` for target `riscv64gc-unknown-none-elf`\n\nwarning: dropping unsupported crate type `proc-macro` for target `riscv64gc-unknown-none-elf`\n\nwarning: 3 warnings emitted\n\n"],"4476964694761187371":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/chenzhiyang/.rustup/toolchains/nightly-2021-01-30-aarch64-apple-darwin\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"crc\"\ntarget_feature=\"crypto\"\ntarget_feature=\"fp\"\ntarget_feature=\"fp16\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rdm\"\ntarget_feature=\"v8.1a\"\ntarget_feature=\"v8.2a\"\ntarget_feature=\"v8.3a\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"128\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"128\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"apple\"\nunix\n",""],"13789308117277828956":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/chenzhiyang/.rustup/toolchains/nightly-2021-01-30-aarch64-apple-darwin\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"crc\"\ntarget_feature=\"crypto\"\ntarget_feature=\"fp\"\ntarget_feature=\"fp16\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rdm\"\ntarget_feature=\"v8.1a\"\ntarget_feature=\"v8.2a\"\ntarget_feature=\"v8.3a\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"128\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"128\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"apple\"\nunix\n",""],"1164083562126845933":["rustc 1.51.0-nightly (b12290861 2021-01-29)\nbinary: rustc\ncommit-hash: b122908617436af187252572ed5db96850551380\ncommit-date: 2021-01-29\nhost: aarch64-apple-darwin\nrelease: 1.51.0-nightly\nLLVM version: 11.0.1\n",""],"5747014971574785997":["___\nlib___.rlib\nlib___.dylib\nlib___.dylib\nlib___.a\nlib___.dylib\n/Users/chenzhiyang/.rustup/toolchains/nightly-2021-01-30-aarch64-apple-darwin\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"aarch64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_family=\"unix\"\ntarget_feature=\"crc\"\ntarget_feature=\"crypto\"\ntarget_feature=\"fp\"\ntarget_feature=\"fp16\"\ntarget_feature=\"lse\"\ntarget_feature=\"neon\"\ntarget_feature=\"ras\"\ntarget_feature=\"rcpc\"\ntarget_feature=\"rdm\"\ntarget_feature=\"v8.1a\"\ntarget_feature=\"v8.2a\"\ntarget_feature=\"v8.3a\"\ntarget_has_atomic=\"128\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"128\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"128\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"macos\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"apple\"\nunix\n",""]},"successes":{}}
\ No newline at end of file
{"rustc_fingerprint":9680999004345779706,"outputs":{"1164083562126845933":["rustc 1.51.0-nightly (b12290861 2021-01-29)\nbinary: rustc\ncommit-hash: b122908617436af187252572ed5db96850551380\ncommit-date: 2021-01-29\nhost: x86_64-unknown-linux-gnu\nrelease: 1.51.0-nightly\nLLVM version: 11.0.1\n",""],"2196823701345282402":["___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/hm/.rustup/toolchains/nightly-2021-01-30-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n",""],"4476964694761187371":["___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/hm/.rustup/toolchains/nightly-2021-01-30-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n",""],"3451674829631148818":["___\nlib___.rlib\nlib___.a\n/home/hm/.rustup/toolchains/nightly-2021-01-30-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"abort\"\nproc_macro\ntarget_arch=\"riscv64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_feature=\"a\"\ntarget_feature=\"c\"\ntarget_feature=\"d\"\ntarget_feature=\"f\"\ntarget_feature=\"m\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"none\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\n","warning: dropping unsupported crate type `dylib` for target `riscv64gc-unknown-none-elf`\n\nwarning: dropping unsupported crate type `cdylib` for target `riscv64gc-unknown-none-elf`\n\nwarning: dropping unsupported crate type `proc-macro` for target `riscv64gc-unknown-none-elf`\n\nwarning: 3 warnings emitted\n\n"],"13789308117277828956":["___\nlib___.rlib\nlib___.so\nlib___.so\nlib___.a\nlib___.so\n/home/hm/.rustup/toolchains/nightly-2021-01-30-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"unwind\"\nproc_macro\ntarget_arch=\"x86_64\"\ntarget_endian=\"little\"\ntarget_env=\"gnu\"\ntarget_family=\"unix\"\ntarget_feature=\"fxsr\"\ntarget_feature=\"sse\"\ntarget_feature=\"sse2\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"linux\"\ntarget_pointer_width=\"64\"\ntarget_thread_local\ntarget_vendor=\"unknown\"\nunix\n",""],"4014748978772980884":["___\nlib___.rlib\nlib___.a\n/home/hm/.rustup/toolchains/nightly-2021-01-30-x86_64-unknown-linux-gnu\ndebug_assertions\npanic=\"abort\"\nproc_macro\ntarget_arch=\"riscv64\"\ntarget_endian=\"little\"\ntarget_env=\"\"\ntarget_feature=\"a\"\ntarget_feature=\"c\"\ntarget_feature=\"d\"\ntarget_feature=\"f\"\ntarget_feature=\"m\"\ntarget_has_atomic=\"16\"\ntarget_has_atomic=\"32\"\ntarget_has_atomic=\"64\"\ntarget_has_atomic=\"8\"\ntarget_has_atomic=\"ptr\"\ntarget_has_atomic_equal_alignment=\"16\"\ntarget_has_atomic_equal_alignment=\"32\"\ntarget_has_atomic_equal_alignment=\"64\"\ntarget_has_atomic_equal_alignment=\"8\"\ntarget_has_atomic_equal_alignment=\"ptr\"\ntarget_has_atomic_load_store=\"16\"\ntarget_has_atomic_load_store=\"32\"\ntarget_has_atomic_load_store=\"64\"\ntarget_has_atomic_load_store=\"8\"\ntarget_has_atomic_load_store=\"ptr\"\ntarget_os=\"none\"\ntarget_pointer_width=\"64\"\ntarget_vendor=\"unknown\"\n","warning: dropping unsupported crate type `dylib` for target `riscv64gc-unknown-none-elf`\n\nwarning: dropping unsupported crate type `cdylib` for target `riscv64gc-unknown-none-elf`\n\nwarning: dropping unsupported crate type `proc-macro` for target `riscv64gc-unknown-none-elf`\n\nwarning: 3 warnings emitted\n\n"]},"successes":{}}
\ No newline at end of file
{"message":"unresolved import `crate::config::CLOCK_FREQ`","code":{"code":"E0432","explanation":"An import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nIn Rust 2015, paths in `use` statements are relative to the crate root. To\nimport items relative to the current and parent modules, use the `self::` and\n`super::` prefixes, respectively.\n\nIn Rust 2018, paths in `use` statements are relative to the current module\nunless they begin with the name of a crate or a literal `crate::`, in which\ncase they start from the crate root. As in Rust 2015 code, the `self::` and\n`super::` prefixes refer to the current and parent modules respectively.\n\nAlso verify that you didn't misspell the import name and that the import exists\nin the module from where you tried to import it. Example:\n\n```\nuse self::something::Foo; // Ok.\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nIf you tried to use a module from an external crate and are using Rust 2015,\nyou may have missed the `extern crate` declaration (which is usually placed in\nthe crate root):\n\n```edition2015\nextern crate core; // Required to use the `core` crate in Rust 2015.\n\nuse core::any;\n# fn main() {}\n```\n\nIn Rust 2018 the `extern crate` declaration is not required and you can instead\njust `use` it:\n\n```edition2018\nuse core::any; // No extern crate required in Rust 2018.\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"src/timer.rs","byte_start":58,"byte_end":83,"line_start":3,"line_end":3,"column_start":5,"column_end":30,"is_primary":true,"text":[{"text":"use crate::config::CLOCK_FREQ;","highlight_start":5,"highlight_end":30}],"label":"no `CLOCK_FREQ` in `config`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0432]\u001b[0m\u001b[0m\u001b[1m: unresolved import `crate::config::CLOCK_FREQ`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/timer.rs:3:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m3\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse crate::config::CLOCK_FREQ;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mno `CLOCK_FREQ` in `config`\u001b[0m\n\n"}
{"message":"unresolved import `crate::config::MMIO`","code":{"code":"E0432","explanation":"An import was unresolved.\n\nErroneous code example:\n\n```compile_fail,E0432\nuse something::Foo; // error: unresolved import `something::Foo`.\n```\n\nIn Rust 2015, paths in `use` statements are relative to the crate root. To\nimport items relative to the current and parent modules, use the `self::` and\n`super::` prefixes, respectively.\n\nIn Rust 2018, paths in `use` statements are relative to the current module\nunless they begin with the name of a crate or a literal `crate::`, in which\ncase they start from the crate root. As in Rust 2015 code, the `self::` and\n`super::` prefixes refer to the current and parent modules respectively.\n\nAlso verify that you didn't misspell the import name and that the import exists\nin the module from where you tried to import it. Example:\n\n```\nuse self::something::Foo; // Ok.\n\nmod something {\n pub struct Foo;\n}\n# fn main() {}\n```\n\nIf you tried to use a module from an external crate and are using Rust 2015,\nyou may have missed the `extern crate` declaration (which is usually placed in\nthe crate root):\n\n```edition2015\nextern crate core; // Required to use the `core` crate in Rust 2015.\n\nuse core::any;\n# fn main() {}\n```\n\nIn Rust 2018 the `extern crate` declaration is not required and you can instead\njust `use` it:\n\n```edition2018\nuse core::any; // No extern crate required in Rust 2018.\n# fn main() {}\n```\n"},"level":"error","spans":[{"file_name":"src/mm/memory_set.rs","byte_start":435,"byte_end":439,"line_start":17,"line_end":17,"column_start":5,"column_end":9,"is_primary":true,"text":[{"text":" MMIO,","highlight_start":5,"highlight_end":9}],"label":"no `MMIO` in `config`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0432]\u001b[0m\u001b[0m\u001b[1m: unresolved import `crate::config::MMIO`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/mm/memory_set.rs:17:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m17\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m MMIO,\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9mno `MMIO` in `config`\u001b[0m\n\n"}
{"message":"failed to resolve: use of undeclared type `BlockDeviceImpl`","code":{"code":"E0433","explanation":"An undeclared crate, module, or type was used.\n\nErroneous code example:\n\n```compile_fail,E0433\nlet map = HashMap::new();\n// error: failed to resolve: use of undeclared type `HashMap`\n```\n\nPlease verify you didn't misspell the type/module's name or that you didn't\nforget to import it:\n\n```\nuse std::collections::HashMap; // HashMap has been imported.\nlet map: HashMap<u32, u32> = HashMap::new(); // So it can be used!\n```\n\nIf you've expected to use a crate name:\n\n```compile_fail\nuse ferris_wheel::BigO;\n// error: failed to resolve: use of undeclared crate or module `ferris_wheel`\n```\n\nMake sure the crate has been added as a dependency in `Cargo.toml`.\n\nTo use a module from your current crate, add the `crate::` prefix to the path.\n"},"level":"error","spans":[{"file_name":"src/drivers/block/mod.rs","byte_start":336,"byte_end":351,"line_start":15,"line_end":15,"column_start":66,"column_end":81,"is_primary":true,"text":[{"text":" pub static ref BLOCK_DEVICE: Arc<dyn BlockDevice> = Arc::new(BlockDeviceImpl::new());","highlight_start":66,"highlight_end":81}],"label":"use of undeclared type `BlockDeviceImpl`","suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror[E0433]\u001b[0m\u001b[0m\u001b[1m: failed to resolve: use of undeclared type `BlockDeviceImpl`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/drivers/block/mod.rs:15:66\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m15\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m pub static ref BLOCK_DEVICE: Arc<dyn BlockDevice> = Arc::new(BlockDeviceImpl::new());\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9m^^^^^^^^^^^^^^^\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;9muse of undeclared type `BlockDeviceImpl`\u001b[0m\n\n"}
{"message":"unused import: `ToString`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/task/task.rs","byte_start":356,"byte_end":364,"line_start":15,"line_end":15,"column_start":29,"column_end":37,"is_primary":true,"text":[{"text":"use alloc::string::{String, ToString};","highlight_start":29,"highlight_end":37}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src/task/task.rs","byte_start":354,"byte_end":364,"line_start":15,"line_end":15,"column_start":27,"column_end":37,"is_primary":true,"text":[{"text":"use alloc::string::{String, ToString};","highlight_start":27,"highlight_end":37}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `ToString`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/task/task.rs:15:29\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m15\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse alloc::string::{String, ToString};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
{"message":"unused import: `crate::timer::get_time_ms`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/task/processor.rs","byte_start":33,"byte_end":58,"line_start":2,"line_end":2,"column_start":5,"column_end":30,"is_primary":true,"text":[{"text":"use crate::timer::get_time_ms;","highlight_start":5,"highlight_end":30}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/task/processor.rs","byte_start":29,"byte_end":59,"line_start":2,"line_end":2,"column_start":1,"column_end":31,"is_primary":true,"text":[{"text":"use crate::timer::get_time_ms;","highlight_start":1,"highlight_end":31}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `crate::timer::get_time_ms`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/task/processor.rs:2:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m2\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse crate::timer::get_time_ms;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n"}
{"message":"unused import: `sync::Arc`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/fs/proc.rs","byte_start":29,"byte_end":38,"line_start":2,"line_end":2,"column_start":13,"column_end":22,"is_primary":true,"text":[{"text":"use alloc::{sync::Arc, vec::Vec};","highlight_start":13,"highlight_end":22}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src/fs/proc.rs","byte_start":29,"byte_end":40,"line_start":2,"line_end":2,"column_start":13,"column_end":24,"is_primary":true,"text":[{"text":"use alloc::{sync::Arc, vec::Vec};","highlight_start":13,"highlight_end":24}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `sync::Arc`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/fs/proc.rs:2:13\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m2\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse alloc::{sync::Arc, vec::Vec};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^\u001b[0m\n\n"}
{"message":"unused import: `get_time`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/syscall/process.rs","byte_start":192,"byte_end":200,"line_start":10,"line_end":10,"column_start":20,"column_end":28,"is_primary":true,"text":[{"text":"use crate::timer::{get_time, get_time_ms};","highlight_start":20,"highlight_end":28}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"`#[warn(unused_imports)]` on by default","code":null,"level":"note","spans":[],"children":[],"rendered":null},{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src/syscall/process.rs","byte_start":192,"byte_end":202,"line_start":10,"line_end":10,"column_start":20,"column_end":30,"is_primary":true,"text":[{"text":"use crate::timer::{get_time, get_time_ms};","highlight_start":20,"highlight_end":30}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `get_time`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/syscall/process.rs:10:20\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m10\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse crate::timer::{get_time, get_time_ms};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m= \u001b[0m\u001b[0m\u001b[1mnote\u001b[0m\u001b[0m: `#[warn(unused_imports)]` on by default\u001b[0m\n\n"}
{"message":"unused import: `ToString`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/task/task.rs","byte_start":389,"byte_end":397,"line_start":16,"line_end":16,"column_start":29,"column_end":37,"is_primary":true,"text":[{"text":"use alloc::string::{String, ToString};","highlight_start":29,"highlight_end":37}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src/task/task.rs","byte_start":387,"byte_end":397,"line_start":16,"line_end":16,"column_start":27,"column_end":37,"is_primary":true,"text":[{"text":"use alloc::string::{String, ToString};","highlight_start":27,"highlight_end":37}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `ToString`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/task/task.rs:16:29\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m16\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse alloc::string::{String, ToString};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^\u001b[0m\n\n"}
{"message":"unused import: `k210_hal::cache::Uncache`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/task/processor.rs","byte_start":86,"byte_end":110,"line_start":4,"line_end":4,"column_start":5,"column_end":29,"is_primary":true,"text":[{"text":"use k210_hal::cache::Uncache;","highlight_start":5,"highlight_end":29}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the whole `use` item","code":null,"level":"help","spans":[{"file_name":"src/task/processor.rs","byte_start":82,"byte_end":111,"line_start":4,"line_end":4,"column_start":1,"column_end":30,"is_primary":true,"text":[{"text":"use k210_hal::cache::Uncache;","highlight_start":1,"highlight_end":30}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `k210_hal::cache::Uncache`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/task/processor.rs:4:5\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m4\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse k210_hal::cache::Uncache;\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^^^^^^^^^^^^^^^^^\u001b[0m\n\n"}
{"message":"unused import: `ToString`","code":{"code":"unused_imports","explanation":null},"level":"warning","spans":[{"file_name":"src/fs/proc.rs","byte_start":79,"byte_end":87,"line_start":3,"line_end":3,"column_start":29,"column_end":37,"is_primary":true,"text":[{"text":"use alloc::string::{String, ToString};","highlight_start":29,"highlight_end":37}],"label":null,"suggested_replacement":null,"suggestion_applicability":null,"expansion":null}],"children":[{"message":"remove the unused import","code":null,"level":"help","spans":[{"file_name":"src/fs/proc.rs","byte_start":77,"byte_end":87,"line_start":3,"line_end":3,"column_start":27,"column_end":37,"is_primary":true,"text":[{"text":"use alloc::string::{String, ToString};","highlight_start":27,"highlight_end":37}],"label":null,"suggested_replacement":"","suggestion_applicability":"MachineApplicable","expansion":null}],"children":[],"rendered":null}],"rendered":"\u001b[0m\u001b[1m\u001b[33mwarning\u001b[0m\u001b[0m\u001b[1m: unused import: `ToString`\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m--> \u001b[0m\u001b[0msrc/fs/proc.rs:3:29\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m|\u001b[0m\n\u001b[0m\u001b[1m\u001b[38;5;12m3\u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0muse alloc::string::{String, ToString};\u001b[0m\n\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[38;5;12m| \u001b[0m\u001b[0m \u001b[0m\u001b[0m\u001b[1m\u001b[33m^^^^^^^^\u001b[0m\n\n"}
{"message":"aborting due to 3 previous errors; 4 warnings emitted","code":null,"level":"error","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1m\u001b[38;5;9merror\u001b[0m\u001b[0m\u001b[1m: aborting due to 3 previous errors; 4 warnings emitted\u001b[0m\n\n"}
{"message":"Some errors have detailed explanations: E0432, E0433.","code":null,"level":"failure-note","spans":[],"children":[],"rendered":"\u001b[0m\u001b[1mSome errors have detailed explanations: E0432, E0433.\u001b[0m\n"}
......
/Users/chenzhiyang/projects/github/rustperf/os/target/riscv64gc-unknown-none-elf/release/os: /Users/chenzhiyang/projects/github/rustperf/easy-fs/src/bitmap.rs /Users/chenzhiyang/projects/github/rustperf/easy-fs/src/block_cache.rs /Users/chenzhiyang/projects/github/rustperf/easy-fs/src/block_dev.rs /Users/chenzhiyang/projects/github/rustperf/easy-fs/src/efs.rs /Users/chenzhiyang/projects/github/rustperf/easy-fs/src/layout.rs /Users/chenzhiyang/projects/github/rustperf/easy-fs/src/lib.rs /Users/chenzhiyang/projects/github/rustperf/easy-fs/src/vfs.rs /Users/chenzhiyang/projects/github/rustperf/os/build.rs /Users/chenzhiyang/projects/github/rustperf/os/src/config.rs /Users/chenzhiyang/projects/github/rustperf/os/src/console.rs /Users/chenzhiyang/projects/github/rustperf/os/src/drivers/block/mod.rs /Users/chenzhiyang/projects/github/rustperf/os/src/drivers/block/sdcard.rs /Users/chenzhiyang/projects/github/rustperf/os/src/drivers/block/virtio_blk.rs /Users/chenzhiyang/projects/github/rustperf/os/src/drivers/mod.rs /Users/chenzhiyang/projects/github/rustperf/os/src/entry.asm /Users/chenzhiyang/projects/github/rustperf/os/src/fs/inode.rs /Users/chenzhiyang/projects/github/rustperf/os/src/fs/mod.rs /Users/chenzhiyang/projects/github/rustperf/os/src/fs/pipe.rs /Users/chenzhiyang/projects/github/rustperf/os/src/fs/proc.rs /Users/chenzhiyang/projects/github/rustperf/os/src/fs/stdio.rs /Users/chenzhiyang/projects/github/rustperf/os/src/lang_items.rs /Users/chenzhiyang/projects/github/rustperf/os/src/main.rs /Users/chenzhiyang/projects/github/rustperf/os/src/mm/address.rs /Users/chenzhiyang/projects/github/rustperf/os/src/mm/frame_allocator.rs /Users/chenzhiyang/projects/github/rustperf/os/src/mm/heap_allocator.rs /Users/chenzhiyang/projects/github/rustperf/os/src/mm/memory_set.rs /Users/chenzhiyang/projects/github/rustperf/os/src/mm/mod.rs /Users/chenzhiyang/projects/github/rustperf/os/src/mm/page_table.rs /Users/chenzhiyang/projects/github/rustperf/os/src/sbi.rs /Users/chenzhiyang/projects/github/rustperf/os/src/syscall/fs.rs /Users/chenzhiyang/projects/github/rustperf/os/src/syscall/mod.rs /Users/chenzhiyang/projects/github/rustperf/os/src/syscall/process.rs /Users/chenzhiyang/projects/github/rustperf/os/src/task/context.rs /Users/chenzhiyang/projects/github/rustperf/os/src/task/manager.rs /Users/chenzhiyang/projects/github/rustperf/os/src/task/mod.rs /Users/chenzhiyang/projects/github/rustperf/os/src/task/pid.rs /Users/chenzhiyang/projects/github/rustperf/os/src/task/processor.rs /Users/chenzhiyang/projects/github/rustperf/os/src/task/switch.S /Users/chenzhiyang/projects/github/rustperf/os/src/task/switch.rs /Users/chenzhiyang/projects/github/rustperf/os/src/task/task.rs /Users/chenzhiyang/projects/github/rustperf/os/src/timer.rs /Users/chenzhiyang/projects/github/rustperf/os/src/trap/context.rs /Users/chenzhiyang/projects/github/rustperf/os/src/trap/mod.rs /Users/chenzhiyang/projects/github/rustperf/os/src/trap/trap.S ../user/src/ ../user/target/riscv64gc-unknown-none-elf/release/ memory-k210.x
/home/hm/RustPerf/os/target/riscv64gc-unknown-none-elf/release/os: /home/hm/RustPerf/easy-fs/src/bitmap.rs /home/hm/RustPerf/easy-fs/src/block_cache.rs /home/hm/RustPerf/easy-fs/src/block_dev.rs /home/hm/RustPerf/easy-fs/src/efs.rs /home/hm/RustPerf/easy-fs/src/layout.rs /home/hm/RustPerf/easy-fs/src/lib.rs /home/hm/RustPerf/easy-fs/src/vfs.rs /home/hm/RustPerf/os/build.rs /home/hm/RustPerf/os/src/config.rs /home/hm/RustPerf/os/src/console.rs /home/hm/RustPerf/os/src/drivers/block/mod.rs /home/hm/RustPerf/os/src/drivers/block/sdcard.rs /home/hm/RustPerf/os/src/drivers/block/virtio_blk.rs /home/hm/RustPerf/os/src/drivers/mod.rs /home/hm/RustPerf/os/src/entry.asm /home/hm/RustPerf/os/src/fs/inode.rs /home/hm/RustPerf/os/src/fs/mod.rs /home/hm/RustPerf/os/src/fs/pipe.rs /home/hm/RustPerf/os/src/fs/proc.rs /home/hm/RustPerf/os/src/fs/stdio.rs /home/hm/RustPerf/os/src/lang_items.rs /home/hm/RustPerf/os/src/main.rs /home/hm/RustPerf/os/src/mm/address.rs /home/hm/RustPerf/os/src/mm/frame_allocator.rs /home/hm/RustPerf/os/src/mm/heap_allocator.rs /home/hm/RustPerf/os/src/mm/memory_set.rs /home/hm/RustPerf/os/src/mm/mod.rs /home/hm/RustPerf/os/src/mm/page_table.rs /home/hm/RustPerf/os/src/sbi.rs /home/hm/RustPerf/os/src/syscall/fs.rs /home/hm/RustPerf/os/src/syscall/mod.rs /home/hm/RustPerf/os/src/syscall/process.rs /home/hm/RustPerf/os/src/task/context.rs /home/hm/RustPerf/os/src/task/manager.rs /home/hm/RustPerf/os/src/task/mod.rs /home/hm/RustPerf/os/src/task/pid.rs /home/hm/RustPerf/os/src/task/processor.rs /home/hm/RustPerf/os/src/task/switch.S /home/hm/RustPerf/os/src/task/switch.rs /home/hm/RustPerf/os/src/task/task.rs /home/hm/RustPerf/os/src/timer.rs /home/hm/RustPerf/os/src/trap/context.rs /home/hm/RustPerf/os/src/trap/mod.rs /home/hm/RustPerf/os/src/trap/trap.S ../user/src/ ../user/target/riscv64gc-unknown-none-elf/release/ memory-k210.x
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册