Changeset ae5aa90 in mainline


Ignore:
Timestamp:
2009-05-14T21:29:00Z (15 years ago)
Author:
Jiri Svoboda <jirik.svoboda@…>
Branches:
lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
Children:
9ba6262
Parents:
8ebc8bf4
Message:

Clean up various log messages, mostly udebug.

Location:
kernel/generic/src
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • kernel/generic/src/ipc/kbox.c

    r8ebc8bf4 rae5aa90  
    8585       
    8686        if (have_kb_thread) {
    87                 LOG("join kb.thread..\n");
     87                LOG("Join kb.thread.");
    8888                thread_join(TASK->kb.thread);
    8989                thread_detach(TASK->kb.thread);
    90                 LOG("join done\n");
     90                LOG("...join done.");
    9191                TASK->kb.thread = NULL;
    9292        }
     
    109109        ipl_t ipl;
    110110
    111         LOG("kbox_proc_phone_hungup()\n");
    112 
    113111        /* Was it our debugger, who hung up? */
    114112        if (call->sender == TASK->udebug.debugger) {
    115113                /* Terminate debugging session (if any). */
    116                 LOG("kbox: terminate debug session\n");
     114                LOG("Terminate debugging session.");
    117115                ipl = interrupts_disable();
    118116                spinlock_lock(&TASK->lock);
     
    121119                interrupts_restore(ipl);
    122120        } else {
    123                 LOG("kbox: was not debugger\n");
    124         }
    125 
    126         LOG("kbox: continue with hangup message\n");
     121                LOG("Was not debugger.");
     122        }
     123
     124        LOG("Continue with hangup message.");
    127125        IPC_SET_RETVAL(call->data, 0);
    128126        ipc_answer(&TASK->kb.box, call);
     
    146144                mutex_unlock(&TASK->kb.cleanup_lock);
    147145
    148                 LOG("phone list is empty\n");
     146                LOG("Phone list is empty.");
    149147                *last = true;
    150148        } else {
     
    170168
    171169        (void)arg;
    172         LOG("kbox_thread_proc()\n");
     170        LOG("Starting.");
    173171        done = false;
    174172
     
    202200        }
    203201
    204         LOG("kbox: finished\n");
     202        LOG("Exiting.");
    205203}
    206204
  • kernel/generic/src/main/main.c

    r8ebc8bf4 rae5aa90  
    251251                for (i = 0; i < init.cnt; i++)
    252252                        LOG("init[%" PRIc "].addr=%#" PRIp ", init[%" PRIc
    253                             "].size=%#" PRIs "\n", i, init.tasks[i].addr, i,
     253                            "].size=%#" PRIs, i, init.tasks[i].addr, i,
    254254                            init.tasks[i].size);
    255255        } else
    256                 printf("No init binaries found\n");
     256                printf("No init binaries found.\n");
    257257       
    258258        LOG_EXEC(ipc_init());
  • kernel/generic/src/syscall/syscall.c

    r8ebc8bf4 rae5aa90  
    6262       
    6363#ifdef CONFIG_UDEBUG
    64         udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false);
     64//      udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, 0, false);
    6565#endif
    6666       
     
    7777       
    7878#ifdef CONFIG_UDEBUG
    79         udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true);
     79//      udebug_syscall_event(a1, a2, a3, a4, a5, a6, id, rc, true);
    8080       
    8181        /*
  • kernel/generic/src/udebug/udebug.c

    r8ebc8bf4 rae5aa90  
    272272        }
    273273
    274         //printf("udebug_syscall_event\n");
     274        /* Fill in the GO response. */
    275275        call = THREAD->udebug.go_call;
    276276        THREAD->udebug.go_call = NULL;
     
    280280        IPC_SET_ARG2(call->data, id);
    281281        IPC_SET_ARG3(call->data, rc);
    282         //printf("udebug_syscall_event/ipc_answer\n");
    283282
    284283        THREAD->udebug.syscall_args[0] = a1;
     
    330329        thread_attach(t, ta);
    331330
    332         LOG("udebug_thread_b_event\n");
    333         LOG("- check state\n");
     331        LOG("Check state");
    334332
    335333        /* Must only generate events when in debugging session */
    336334        if (THREAD->udebug.active != true) {
    337                 LOG("- udebug.active: %s, udebug.go: %s\n",
    338                         THREAD->udebug.active ? "yes(+)" : "no(-)",
    339                         THREAD->udebug.go ? "yes(-)" : "no(+)");
     335                LOG("udebug.active: %s, udebug.go: %s",
     336                        THREAD->udebug.active ? "Yes(+)" : "No",
     337                        THREAD->udebug.go ? "Yes(-)" : "No");
    340338                mutex_unlock(&THREAD->udebug.lock);
    341339                mutex_unlock(&TASK->udebug.lock);
     
    343341        }
    344342
    345         LOG("- trigger event\n");
    346 
     343        LOG("Trigger event");
    347344        call = THREAD->udebug.go_call;
    348345        THREAD->udebug.go_call = NULL;
     
    364361        mutex_unlock(&TASK->udebug.lock);
    365362
    366         LOG("- sleep\n");
     363        LOG("Wait for Go");
    367364        udebug_wait_for_go(&THREAD->udebug.go_wq);
    368365}
     
    380377        mutex_lock(&THREAD->udebug.lock);
    381378
    382         LOG("udebug_thread_e_event\n");
    383         LOG("- check state\n");
     379        LOG("Check state");
    384380
    385381        /* Must only generate events when in debugging session. */
    386382        if (THREAD->udebug.active != true) {
    387 /*              printf("- udebug.active: %s, udebug.go: %s\n",
    388                         THREAD->udebug.active ? "yes(+)" : "no(-)",
    389                         THREAD->udebug.go ? "yes(-)" : "no(+)");*/
     383                LOG("udebug.active: %s, udebug.go: %s",
     384                        THREAD->udebug.active ? "Yes" : "No",
     385                        THREAD->udebug.go ? "Yes" : "No");
    390386                mutex_unlock(&THREAD->udebug.lock);
    391387                mutex_unlock(&TASK->udebug.lock);
     
    393389        }
    394390
    395         LOG("- trigger event\n");
    396 
     391        LOG("Trigger event");
    397392        call = THREAD->udebug.go_call;
    398393        THREAD->udebug.go_call = NULL;
     
    433428        ipl_t ipl;
    434429
    435         LOG("udebug_task_cleanup()\n");
    436         LOG("task %" PRIu64 "\n", ta->taskid);
    437 
    438430        if (ta->udebug.dt_state != UDEBUG_TS_BEGINNING &&
    439431            ta->udebug.dt_state != UDEBUG_TS_ACTIVE) {
    440                 LOG("udebug_task_cleanup(): task not being debugged\n");
    441432                return EINVAL;
    442433        }
     434
     435        LOG("Task %" PRIu64, ta->taskid);
    443436
    444437        /* Finish debugging of all userspace threads */
     
    471464
    472465                                /* Answer GO call */
    473                                 LOG("answer GO call with EVENT_FINISHED\n");
     466                                LOG("Answer GO call with EVENT_FINISHED.");
    474467                                IPC_SET_RETVAL(t->udebug.go_call->data, 0);
    475468                                IPC_SET_ARG1(t->udebug.go_call->data,
  • kernel/generic/src/udebug/udebug_ops.c

    r8ebc8bf4 rae5aa90  
    182182        link_t *cur;
    183183
    184         LOG("udebug_begin()\n");
    185 
    186         mutex_lock(&TASK->udebug.lock);
    187         LOG("debugging task %llu\n", TASK->taskid);
     184        LOG("Debugging task %llu", TASK->taskid);
     185        mutex_lock(&TASK->udebug.lock);
    188186
    189187        if (TASK->udebug.dt_state != UDEBUG_TS_INACTIVE) {
    190188                mutex_unlock(&TASK->udebug.lock);
    191                 LOG("udebug_begin(): busy error\n");
    192 
    193189                return EBUSY;
    194190        }
     
    218214
    219215        mutex_unlock(&TASK->udebug.lock);
    220 
    221         LOG("udebug_begin() done (%s)\n",
    222             reply ? "reply" : "stoppability wait");
    223 
    224216        return reply;
    225217}
     
    234226        int rc;
    235227
    236         LOG("udebug_end()\n");
    237 
    238         mutex_lock(&TASK->udebug.lock);
    239         LOG("task %" PRIu64 "\n", TASK->taskid);
    240 
     228        LOG("Task %" PRIu64, TASK->taskid);
     229
     230        mutex_lock(&TASK->udebug.lock);
    241231        rc = udebug_task_cleanup(TASK);
    242 
    243232        mutex_unlock(&TASK->udebug.lock);
    244233
     
    255244int udebug_set_evmask(udebug_evmask_t mask)
    256245{
    257         LOG("udebug_set_mask()\n");
     246        LOG("mask = 0x%x", mask);
    258247
    259248        mutex_lock(&TASK->udebug.lock);
     
    261250        if (TASK->udebug.dt_state != UDEBUG_TS_ACTIVE) {
    262251                mutex_unlock(&TASK->udebug.lock);
    263                 LOG("udebug_set_mask(): not active debuging session\n");
    264 
    265252                return EINVAL;
    266253        }
    267254
    268255        TASK->udebug.evmask = mask;
    269 
    270256        mutex_unlock(&TASK->udebug.lock);
    271257
     
    318304        int rc;
    319305
    320         LOG("udebug_stop()\n");
     306        LOG("udebug_stop()");
    321307
    322308        /*
     
    341327         * Answer GO call.
    342328         */
    343         LOG("udebug_stop - answering go call\n");
    344329
    345330        /* Make sure nobody takes this call away from us. */
     
    349334        IPC_SET_RETVAL(call->data, 0);
    350335        IPC_SET_ARG1(call->data, UDEBUG_EVENT_STOP);
    351         LOG("udebug_stop/ipc_answer\n");
    352336
    353337        THREAD->udebug.cur_event = UDEBUG_EVENT_STOP;
     
    359343        mutex_unlock(&TASK->udebug.lock);
    360344
    361         LOG("udebog_stop/done\n");
    362345        return 0;
    363346}
     
    393376        size_t max_ids;
    394377
    395         LOG("udebug_thread_read()\n");
     378        LOG("udebug_thread_read()");
    396379
    397380        /* Allocate a buffer to hold thread IDs */
Note: See TracChangeset for help on using the changeset viewer.