trace: remove SCHED_INSTRUMENTATION_HIRES
Signed-off-by: yinshengkai <yinshengkai@xiaomi.com>
This commit is contained in:
parent
7cc325ae83
commit
19ba886ec2
@ -40,17 +40,10 @@
|
|||||||
* Pre-processor Definitions
|
* Pre-processor Definitions
|
||||||
************************************************************************************/
|
************************************************************************************/
|
||||||
|
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION_HIRES
|
|
||||||
# define syslog_time(priority, fmt, ...) \
|
|
||||||
syslog(priority, "%08lx.%08lx: " fmt, \
|
|
||||||
(unsigned long)systime_sec, (unsigned long)systime_nsec, \
|
|
||||||
__VA_ARGS__)
|
|
||||||
#else
|
|
||||||
# define syslog_time(priority, fmt, ...) \
|
# define syslog_time(priority, fmt, ...) \
|
||||||
syslog(priority, "%08lx: " fmt, \
|
syslog(priority, "%08lx: " fmt, \
|
||||||
(unsigned long)systime, \
|
(unsigned long)systime, \
|
||||||
__VA_ARGS__)
|
__VA_ARGS__)
|
||||||
#endif
|
|
||||||
|
|
||||||
/************************************************************************************
|
/************************************************************************************
|
||||||
* Private Data
|
* Private Data
|
||||||
@ -109,12 +102,8 @@ static void trace_dump_unflatten(FAR void *dst,
|
|||||||
static void dump_notes(size_t nread)
|
static void dump_notes(size_t nread)
|
||||||
{
|
{
|
||||||
FAR struct note_common_s *note;
|
FAR struct note_common_s *note;
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION_HIRES
|
|
||||||
uint32_t systime_sec;
|
uint32_t systime_sec;
|
||||||
uint32_t systime_nsec;
|
uint32_t systime_nsec;
|
||||||
#else
|
|
||||||
uint32_t systime;
|
|
||||||
#endif
|
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
off_t offset;
|
off_t offset;
|
||||||
|
|
||||||
@ -123,14 +112,10 @@ static void dump_notes(size_t nread)
|
|||||||
{
|
{
|
||||||
note = (FAR struct note_common_s *)&g_note_buffer[offset];
|
note = (FAR struct note_common_s *)&g_note_buffer[offset];
|
||||||
trace_dump_unflatten(&pid, note->nc_pid, sizeof(pid));
|
trace_dump_unflatten(&pid, note->nc_pid, sizeof(pid));
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION_HIRES
|
|
||||||
trace_dump_unflatten(&systime_nsec,
|
trace_dump_unflatten(&systime_nsec,
|
||||||
note->nc_systime_nsec, sizeof(systime_nsec));
|
note->nc_systime_nsec, sizeof(systime_nsec));
|
||||||
trace_dump_unflatten(&systime_sec,
|
trace_dump_unflatten(&systime_sec,
|
||||||
note->nc_systime_sec, sizeof(systime_sec));
|
note->nc_systime_sec, sizeof(systime_sec));
|
||||||
#else
|
|
||||||
trace_dump_unflatten(&systime, note->nc_systime, sizeof(systime));
|
|
||||||
#endif
|
|
||||||
|
|
||||||
switch (note->nc_type)
|
switch (note->nc_type)
|
||||||
{
|
{
|
||||||
|
@ -291,17 +291,11 @@ static void trace_dump_header(FAR FILE *out,
|
|||||||
FAR struct trace_dump_context_s *ctx)
|
FAR struct trace_dump_context_s *ctx)
|
||||||
{
|
{
|
||||||
pid_t pid;
|
pid_t pid;
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION_HIRES
|
|
||||||
uint32_t nsec;
|
uint32_t nsec;
|
||||||
uint32_t sec;
|
uint32_t sec;
|
||||||
|
|
||||||
trace_dump_unflatten(&nsec, note->nc_systime_nsec, sizeof(nsec));
|
trace_dump_unflatten(&nsec, note->nc_systime_nsec, sizeof(nsec));
|
||||||
trace_dump_unflatten(&sec, note->nc_systime_sec, sizeof(sec));
|
trace_dump_unflatten(&sec, note->nc_systime_sec, sizeof(sec));
|
||||||
#else
|
|
||||||
uint32_t systime;
|
|
||||||
|
|
||||||
trace_dump_unflatten(&systime, note->nc_systime, sizeof(systime));
|
|
||||||
#endif
|
|
||||||
#ifdef CONFIG_SMP
|
#ifdef CONFIG_SMP
|
||||||
int cpu = note->nc_cpu;
|
int cpu = note->nc_cpu;
|
||||||
#else
|
#else
|
||||||
@ -312,13 +306,7 @@ static void trace_dump_header(FAR FILE *out,
|
|||||||
|
|
||||||
fprintf(out, "%8s-%-3u [%d] %3" PRIu32 ".%09" PRIu32 ": ",
|
fprintf(out, "%8s-%-3u [%d] %3" PRIu32 ".%09" PRIu32 ": ",
|
||||||
get_task_name(pid, ctx), get_pid(pid), cpu,
|
get_task_name(pid, ctx), get_pid(pid), cpu,
|
||||||
#ifdef CONFIG_SCHED_INSTRUMENTATION_HIRES
|
|
||||||
sec, nsec
|
sec, nsec
|
||||||
#else
|
|
||||||
systime / (1000 * 1000 / CONFIG_USEC_PER_TICK),
|
|
||||||
(systime % (1000 * 1000 / CONFIG_USEC_PER_TICK))
|
|
||||||
* CONFIG_USEC_PER_TICK * 1000
|
|
||||||
#endif
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user