Changeset da30417b in rtems


Ignore:
Timestamp:
Mar 19, 2015, 7:23:12 AM (5 years ago)
Author:
Chris Johns <chrisj@…>
Branches:
4.11, master
Children:
faf3ff8f
Parents:
55243d09
git-author:
Chris Johns <chrisj@…> (03/19/15 07:23:12)
git-committer:
Chris Johns <chrisj@…> (03/19/15 07:25:51)
Message:

libmisc/capture: Clean up formatting on ARM.

The printing of 64bit diff's for the timestamp did not work on ARM
so I have changed this to 32bit. A 32bit nano-second diff between
events should be more than enough time.

Print '' for POSIX thread output.

Location:
cpukit/libmisc/capture
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • cpukit/libmisc/capture/capture-cli.c

    r55243d09 rda30417b  
    22  ------------------------------------------------------------------------
    33
    4   Copyright Objective Design Systems Pty Ltd, 2002
    5   All rights reserved Objective Design Systems Pty Ltd, 2002
    6   Chris Johns (ccj@acm.org)
    7 
    8   COPYRIGHT (c) 1989-2014.
     4  Copyright 2002, 2015 Chris Johns <chrisj@rtems.org>
     5  All rights reserved.
     6
     7  COPYRIGHT (c) 2014.
    98  On-Line Applications Research Corporation (OAR).
    109
     
    4645 * Counter used to count the number of active tasks.
    4746 */
    48 static int                   rtems_capture_cli_task_count = 0;
     47static int rtems_capture_cli_task_count = 0;
    4948
    5049/*
     
    163162  rtems_status_code sc;
    164163
    165   sc = rtems_capture_control (1);
     164  sc = rtems_capture_control (true);
    166165
    167166  if (sc != RTEMS_SUCCESSFUL)
     
    188187  rtems_status_code sc;
    189188
    190   sc = rtems_capture_control (0);
     189  sc = rtems_capture_control (false);
    191190
    192191  if (sc != RTEMS_SUCCESSFUL)
  • cpukit/libmisc/capture/capture_support.c

    r55243d09 rda30417b  
    22  ------------------------------------------------------------------------
    33
    4   Copyright Objective Design Systems Pty Ltd, 2002
    5   All rights reserved Objective Design Systems Pty Ltd, 2002
    6   Chris Johns (ccj@acm.org)
     4  Copyright 2002, 2015 Chris Johns <chrisj@rtems.org>
     5  All rights reserved.
    76
    87  COPYRIGHT (c) 1989-2014.
     
    8079  fprintf(stdout,"%2" PRId32 " ", cpu);
    8180  rtems_capture_print_timestamp (rec->time);
    82   fprintf (stdout, "            ");
     81  fprintf (stdout, "              ");
    8382  rtems_monitor_dump_id (rec->task_id);
    84   fprintf (stdout, " %c%c%c%c",
    85            (char) (task_rec->name >> 24) & 0xff,
    86            (char) (task_rec->name >> 16) & 0xff,
    87            (char) (task_rec->name >> 8) & 0xff,
    88            (char) (task_rec->name >> 0) & 0xff);
     83  if (rtems_object_id_get_api(rec->task_id) != OBJECTS_POSIX_API)
     84  {
     85    fprintf (stdout, " %c%c%c%c",
     86             (char) (task_rec->name >> 24) & 0xff,
     87             (char) (task_rec->name >> 16) & 0xff,
     88             (char) (task_rec->name >> 8) & 0xff,
     89             (char) (task_rec->name >> 0) & 0xff);
     90  }
     91  else
     92  {
     93    fprintf (stdout, " ____");
     94  }
    8995  fprintf(stdout, " %3" PRId32 " %3" PRId32 " ",
    9096             (rec->events >> RTEMS_CAPTURE_REAL_PRIORITY_EVENT) & 0xff,
    91              (rec->events >> RTEMS_CAPTURE_CURR_PRIORITY_EVENT) & 0xff );
    92    fprintf (stdout, "%3" PRId32   " %3" PRId32 "  TASK_RECORD\n",
     97             (rec->events >> RTEMS_CAPTURE_CURR_PRIORITY_EVENT) & 0xff);
     98   fprintf (stdout, "%3" PRId32   " %6" PRId32 "  TASK_RECORD\n",
    9399            task_rec->start_priority,
    94100            task_rec->stack_size);
     
    111117      fprintf(stdout,"%2" PRId32 " ", cpu);
    112118      rtems_capture_print_timestamp (rec->time);
    113       fprintf (stdout, " %10" PRId64 " ", diff);
     119      fprintf (stdout, " %12" PRId32 " ", (uint32_t) diff);
    114120      rtems_monitor_dump_id (rec->task_id);
    115       fprintf(stdout, "      %3" PRId32 " %3" PRId32 "           %s\n",
     121      fprintf(stdout, "      %3" PRId32 " %3" PRId32 "             %s\n",
    116122             (rec->events >> RTEMS_CAPTURE_REAL_PRIORITY_EVENT) & 0xff,
    117123             (rec->events >> RTEMS_CAPTURE_CURR_PRIORITY_EVENT) & 0xff,
     
    189195          rtems_capture_print_record_task(cpu, rec_out );
    190196      else {
    191         uint64_t diff = 0;
    192         if (per_cpu[cpu].last_t)
     197        uint64_t diff;
     198        if (per_cpu[cpu].last_t != 0)
    193199          diff = rec_out->time - per_cpu[cpu].last_t;
     200        else
     201          diff = 0;
    194202        per_cpu[cpu].last_t = rec_out->time;
    195203
Note: See TracChangeset for help on using the changeset viewer.