Changeset 7ad17de in mainline


Ignore:
Timestamp:
2012-11-18T10:59:41Z (11 years ago)
Author:
Jakub Jermar <jakub@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
dbb3552
Parents:
9043309c
Message:

Instead of printing the standard kill message, only inform the user when a task
is killed because of its failure to late-reserve memory. This happens, for
example, when there is not enough memory to grow thread stack.

Location:
kernel/generic
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/include/proc/task.h

    r9043309c r7ad17de  
    134134        uint64_t ucycles;
    135135        uint64_t kcycles;
     136
     137        /** If true, do not attempt to print a verbose kill message. */
     138        bool silent_kill;
    136139} task_t;
    137140
  • kernel/generic/src/interrupt/interrupt.c

    r9043309c r7ad17de  
    168168static NO_TRACE void fault_from_uspace_core(istate_t *istate, const char *fmt, va_list args)
    169169{
    170         printf("Task %s (%" PRIu64 ") killed due to an exception at "
    171             "program counter %p.\n", TASK->name, TASK->taskid,
    172             (void *) istate_get_pc(istate));
    173        
    174         istate_decode(istate);
    175         stack_trace_istate(istate);
    176        
    177         printf("Kill message: ");
    178         vprintf(fmt, args);
    179         printf("\n");
     170        if (!TASK->silent_kill) {
     171                printf("Task %s (%" PRIu64 ") killed due to an exception at "
     172                    "program counter %p.\n", TASK->name, TASK->taskid,
     173                    (void *) istate_get_pc(istate));
     174       
     175                istate_decode(istate);
     176                stack_trace_istate(istate);
     177       
     178                printf("Kill message: ");
     179                vprintf(fmt, args);
     180                printf("\n");
     181        }
    180182       
    181183        task_kill_self(true);
  • kernel/generic/src/mm/backend_anon.c

    r9043309c r7ad17de  
    255255                         * Reserve the memory for this page now.
    256256                         */
    257                         if (!reserve_try_alloc(1))
     257                        if (!reserve_try_alloc(1)) {
     258                                printf("Killing task %" PRIu64 " due to a "
     259                                    "failed late reservation request.\n",
     260                                    TASK->taskid);
     261                                TASK->silent_kill = true;
    258262                                return AS_PF_FAULT;
     263                        }
    259264                }
    260265
  • kernel/generic/src/proc/task.c

    r9043309c r7ad17de  
    196196        task->ucycles = 0;
    197197        task->kcycles = 0;
     198
     199        task->silent_kill = false;
    198200       
    199201        task->ipc_info.call_sent = 0;
Note: See TracChangeset for help on using the changeset viewer.