Refine error level log
This commit is contained in:
		
							parent
							
								
									1bee38f50a
								
							
						
					
					
						commit
						976135b79c
					
				| @ -131,7 +131,7 @@ pub fn do_handle_exception( | ||||
|             return Ok(0); | ||||
|         } | ||||
| 
 | ||||
|         warn!( | ||||
|         error!( | ||||
|             "#PF not handled. Turn to signal. user context = {:?}", | ||||
|             user_context | ||||
|         ); | ||||
|  | ||||
| @ -55,7 +55,7 @@ pub fn exec(libos_tid: pid_t, host_tid: pid_t) -> Result<i32> { | ||||
|             info!("Thread exited: tid = {}, status = {}", libos_tid, status); | ||||
|         } | ||||
|         TermStatus::Killed(signum) => { | ||||
|             info!("Thread killed: tid = {}, signum = {:?}", libos_tid, signum); | ||||
|             error!("Thread killed: tid = {}, signum = {:?}", libos_tid, signum); | ||||
|         } | ||||
|     } | ||||
| 
 | ||||
|  | ||||
| @ -689,7 +689,6 @@ fn do_syscall(user_context: &mut CpuContext) { | ||||
|     let retval = match ret { | ||||
|         Ok(retval) => retval as isize, | ||||
|         Err(e) => { | ||||
|             // let syscall_num = SyscallNum::try_from(num).unwrap();
 | ||||
|             let should_log_err = |num, errno| { | ||||
|                 let syscall_num = match SyscallNum::try_from(num) { | ||||
|                     Ok(num) => num, | ||||
| @ -708,9 +707,15 @@ fn do_syscall(user_context: &mut CpuContext) { | ||||
|                 // to suppress error messages.
 | ||||
|                 match errno { | ||||
|                     EAGAIN | ETIMEDOUT | ENOENT | ENOTTY => false, | ||||
|                     EINTR => match syscall_num { | ||||
|                         SyscallNum::Nanosleep => false, | ||||
|                         SyscallNum::Futex => false, | ||||
|                         _ => true, | ||||
|                     }, | ||||
|                     ENOSYS => match syscall_num { | ||||
|                         SyscallNum::Getrusage => false, | ||||
|                         SyscallNum::Madvise => false, | ||||
|                         SyscallNum::Ioctl => false, | ||||
|                         _ => true, | ||||
|                     }, | ||||
|                     _ => true, | ||||
|  | ||||
		Loading…
	
		Reference in New Issue
	
	Block a user