Linux Perf
color.c File Reference
#include <linux/kernel.h>
#include "cache.h"
#include "config.h"
#include <stdlib.h>
#include <stdio.h>
#include "color.h"
#include <math.h>
#include <unistd.h>
Include dependency graph for color.c:

Go to the source code of this file.

Functions

int perf_config_colorbool (const char *var, const char *value, int stdout_is_tty)
 
int perf_color_default_config (const char *var, const char *value, void *cb __maybe_unused)
 
static int __color_vsnprintf (char *bf, size_t size, const char *color, const char *fmt, va_list args, const char *trail)
 
static int __color_vfprintf (FILE *fp, const char *color, const char *fmt, va_list args)
 
int color_vsnprintf (char *bf, size_t size, const char *color, const char *fmt, va_list args)
 
int color_vfprintf (FILE *fp, const char *color, const char *fmt, va_list args)
 
int color_snprintf (char *bf, size_t size, const char *color, const char *fmt,...)
 
int color_fprintf (FILE *fp, const char *color, const char *fmt,...)
 
int color_fwrite_lines (FILE *fp, const char *color, size_t count, const char *buf)
 
const char * get_percent_color (double percent)
 
int percent_color_fprintf (FILE *fp, const char *fmt, double percent)
 
int value_color_snprintf (char *bf, size_t size, const char *fmt, double value)
 
int percent_color_snprintf (char *bf, size_t size, const char *fmt,...)
 
int percent_color_len_snprintf (char *bf, size_t size, const char *fmt,...)
 

Variables

int perf_use_color_default = -1
 

Function Documentation

◆ __color_vfprintf()

static int __color_vfprintf ( FILE *  fp,
const char *  color,
const char *  fmt,
va_list  args 
)
static

Definition at line 77 of file color.c.

◆ __color_vsnprintf()

static int __color_vsnprintf ( char *  bf,
size_t  size,
const char *  color,
const char *  fmt,
va_list  args,
const char *  trail 
)
static

Definition at line 51 of file color.c.

◆ color_fprintf()

int color_fprintf ( FILE *  fp,
const char *  color,
const char *  fmt,
  ... 
)

Definition at line 123 of file color.c.

Here is the call graph for this function:

◆ color_fwrite_lines()

int color_fwrite_lines ( FILE *  fp,
const char *  color,
size_t  count,
const char *  buf 
)

Definition at line 139 of file color.c.

◆ color_snprintf()

int color_snprintf ( char *  bf,
size_t  size,
const char *  color,
const char *  fmt,
  ... 
)

Definition at line 111 of file color.c.

Here is the call graph for this function:

◆ color_vfprintf()

int color_vfprintf ( FILE *  fp,
const char *  color,
const char *  fmt,
va_list  args 
)

Definition at line 106 of file color.c.

Here is the call graph for this function:

◆ color_vsnprintf()

int color_vsnprintf ( char *  bf,
size_t  size,
const char *  color,
const char *  fmt,
va_list  args 
)

Definition at line 100 of file color.c.

Here is the call graph for this function:

◆ get_percent_color()

const char* get_percent_color ( double  percent)

Definition at line 162 of file color.c.

◆ percent_color_fprintf()

int percent_color_fprintf ( FILE *  fp,
const char *  fmt,
double  percent 
)

Definition at line 180 of file color.c.

Here is the call graph for this function:

◆ percent_color_len_snprintf()

int percent_color_len_snprintf ( char *  bf,
size_t  size,
const char *  fmt,
  ... 
)

Definition at line 208 of file color.c.

Here is the call graph for this function:

◆ percent_color_snprintf()

int percent_color_snprintf ( char *  bf,
size_t  size,
const char *  fmt,
  ... 
)

Definition at line 197 of file color.c.

Here is the call graph for this function:

◆ perf_color_default_config()

int perf_color_default_config ( const char *  var,
const char *  value,
void *cb  __maybe_unused 
)

Definition at line 40 of file color.c.

Here is the call graph for this function:

◆ perf_config_colorbool()

int perf_config_colorbool ( const char *  var,
const char *  value,
int  stdout_is_tty 
)

Definition at line 13 of file color.c.

Here is the call graph for this function:

◆ value_color_snprintf()

int value_color_snprintf ( char *  bf,
size_t  size,
const char *  fmt,
double  value 
)

Definition at line 191 of file color.c.

Here is the call graph for this function:

Variable Documentation

◆ perf_use_color_default

int perf_use_color_default = -1

Definition at line 11 of file color.c.