当前位置: 首页 > news >正文

专业网站开发哪家好windows优化大师要钱

专业网站开发哪家好,windows优化大师要钱,简述网站开发主要步骤,做网站pytonFtrace相关的文章如何利用ftrace精确跟踪特定进程调度信息1、Ftrace 是什么东西#xff1f;Ftrace是一个直接内置在Linux内核中的跟踪工具。许多发行版在最近的发行版中已经启用了各种各样的Ftrace配置。Ftrace给Linux带来的好处之一是能够看到内核中发生了什么。因此#xf… Ftrace相关的文章如何利用ftrace精确跟踪特定进程调度信息1、Ftrace 是什么东西Ftrace是一个直接内置在Linux内核中的跟踪工具。许多发行版在最近的发行版中已经启用了各种各样的Ftrace配置。Ftrace给Linux带来的好处之一是能够看到内核中发生了什么。因此这使得发现问题区域或简单地跟踪奇怪的bug变得更容易管理。上面那段话是直接翻译过来的原文如下我比较推荐大家直接看英文Ftrace is a tracing utility built directly into the Linux kernel. Many distributions already have various configurations of Ftrace enabled in their most recent releases. One of the benefits that Ftrace brings to Linux is the ability to see what is happening inside the kernel. As such, this makes finding problem areas or simply tracking down that strange bug more manageable.2、怎么使用Ftrace我的实验平台是MT8167、Linux4.4内核2.1、配置内核宏weiqifabsp-ubuntu1804:~/is10-sdk$ git diff kernel-4.4/ diff --git a/kernel-4.4/arch/arm/configs/xxx_defconfig  b/kernel-4.4/arch/arm/configs/xxx_defconfig index 8da5210003..a88e53253f 100755 --- a/kernel-4.4/arch/arm/configs/xxx_defconfigb/kernel-4.4/arch/arm/configs/xxx_defconfig-400,3 400,7  CONFIG_USB_RTL8152yCONFIG_USB_NET_DRIVERSyCONFIG_GPIO_CONTROLy#CONFIG_POGO_PINy CONFIG_FUNCTION_TRACERy CONFIG_FUNCTION_GRAPH_TRACERy CONFIG_STACK_TRACERy CONFIG_DYNAMIC_FTRACEy 2.2、烧录boot.img 重新开机2.3、查看是否生效进入ftrace 目录xxx:/ # cd /sys/kernel/debug/tracing xxx:/sys/kernel/debug/tracing # ls README                     enabled_functions saved_cmdlines      set_graph_function trace_marker available_events           events            saved_cmdlines_size set_graph_notrace  trace_options available_filter_functions free_buffer       saved_tgids         snapshot           trace_pipe available_tracers          instances         set_event           stack_max_size     tracing_cpumask buffer_size_kb             max_graph_depth   set_event_pid       stack_trace        tracing_max_latency buffer_total_size_kb       options           set_ftrace_filter   stack_trace_filter tracing_on current_tracer             per_cpu           set_ftrace_notrace  trace              tracing_thresh dyn_ftrace_total_info      printk_formats    set_ftrace_pid      trace_clock xxx:/sys/kernel/debug/tracing # 查看内核支持的跟踪器列表xxx:/sys/kernel/debug/tracing # cat available_tracers function_graph function nop xxx:/sys/kernel/debug/tracing # Tracer有很多种主要几大类函数类function function_graph stack延时类irqsoff preemptoff preemptirqsoff wakeup wakeup_rt waktup_dl其他类nop mmiotrace blk使能function_graph跟踪器echo function_graph  current_tracer 查看当前的跟踪器xxx:/sys/kernel/debug/tracing # cat current_tracer function_graph xxx:/sys/kernel/debug/tracing # 使能ftrace 功能xxx:/sys/kernel/debug/tracing # echo 1  tracing_on 查看ftrace输出1|Knowin inSight10:/sys/kernel/debug/tracing # cat trace | head -40 # tracer: function_graph # # CPU  DURATION                  FUNCTION CALLS # |     |   |                     |   |   |   |2)   4.000 us    |          } /* path_init */2)               |          link_path_walk() {2)               |            inode_permission2() {2)               |              __inode_permission2() {2)               |                generic_permission() {2)   0.384 us    |                  in_group_p();2)   2.154 us    |                }2)               |                security_inode_permission() {2)               |                  selinux_inode_permission() {2)   0.231 us    |                    __rcu_read_lock();2)   0.308 us    |                    avc_lookup();2)   0.231 us    |                    __rcu_read_unlock();2)   5.923 us    |                  }2)   7.846 us    |                }2)  13.538 us   |              }2)  15.308 us   |            }2)               |            walk_component() {2)               |              lookup_fast() {2)   0.307 us    |                __d_lookup_rcu();2)   0.307 us    |                __lookup_mnt();2)   4.231 us    |              }2)   6.077 us    |            }2)               |            inode_permission2() {2)               |              __inode_permission2() {3)   3.923 us    |                      } /* down_trylock */2)               |                generic_permission() {3)   6.538 us    |                    } /* console_trylock */2)   0.308 us    |                  in_group_p();3)               |                    console_unlock() {3)   0.231 us    |                      _raw_spin_lock_irqsave();2)   2.231 us    |                }2)               |                security_inode_permission() {2)               |                  selinux_inode_permission() {3)   0.308 us    |                      _raw_spin_unlock_irqrestore();2)   0.231 us    |                    __rcu_read_lock();3)   0.231 us    |                      _raw_spin_lock_irqsave(); Knowin inSight10:/sys/kernel/debug/tracing # 3、Ftrace 其他使用特点直接cat trace 文件内容太多了我们可以通过设置filter来设置过滤函数。为了方便使用set_ftrace_filter 文件还支持简单格式的通配符。value* 选择所有名字以 value字串开头的函数*value* 选择所有名字中包含 value字串的函数*value 选择所有名字以 value字串结尾的函数设置filterxxx:/sys/kernel/debug/tracing # echo raw*  set_ftrace_filter xxx:/sys/kernel/debug/tracing # 再查看trace文件xxx:/sys/kernel/debug/tracing # cat trace # tracer: function_graph # # CPU  DURATION                  FUNCTION CALLS # |     |   |                     |   |   |   |2)   1.693 us    |  raw_local_deliver();2)   0.308 us    |  raw_local_deliver();2)   1.000 us    |  raw_notifier_call_chain();2)   2.077 us    |  raw_notifier_call_chain();2)   1.923 us    |  raw_local_deliver();------------------------------------------2)  ntloop--1393      ...-16------------------------------------------2)   0.308 us    |  raw_local_deliver();------------------------------------------2)    ...-16        idle-0------------------------------------------2)   0.307 us    |  raw_notifier_call_chain();2)   0.846 us    |  raw_notifier_call_chain();2)   0.385 us    |  raw_notifier_call_chain();------------------------------------------2)    idle-0      droid.b-4348------------------------------------------2)   1.000 us    |  raw_notifier_call_chain();2)   1.384 us    |  raw_notifier_call_chain();------------------------------------------2)  droid.b-4348    Binder:-524------------------------------------------2)   0.923 us    |  raw_notifier_call_chain();2)   1.077 us    |  raw_notifier_call_chain();------------------------------------------2)  Binder:-524     droid.b-4348------------------------------------------2)   1.000 us    |  raw_notifier_call_chain();------------------------------------------2)  droid.b-4348    Binder:-524------------------------------------------2)   1.231 us    |  raw_notifier_call_chain();------------------------------------------2)  Binder:-524     droid.b-4348------------------------------------------2)   1.077 us    |  raw_notifier_call_chain();2)   1.692 us    |  raw_notifier_call_chain();2)   2.000 us    |  raw_notifier_call_chain();2)   1.000 us    |  raw_notifier_call_chain();2)   0.923 us    |  raw_notifier_call_chain();2)   0.462 us    |  raw_notifier_call_chain();2)   1.000 us    |  raw_notifier_call_chain();2)   0.846 us    |  raw_notifier_call_chain(); 查看中间字符串xxx:/sys/kernel/debug/tracing # echo *touch*  set_ftrace_filter 查看tracexxx:/sys/kernel/debug/tracing # cat trace |head -40 # tracer: function_graph # # CPU  DURATION                  FUNCTION CALLS # |     |   |                     |   |   |   |0)               |  /* 6 [cpu_loading] not_reset_cpu_loading */0)               |  /* 6 [cpu_loading] update cpu_loading */0)               |  /* 6 [cpu_loading] cur_idle_time[0].time:933317139 cur_wall_time[0].time:1008009932*/0)               |  /* 6 [cpu_loading] cur_idle_time[1].time:936071150 cur_wall_time[1].time:1008009942*/0)               |  /* 6 [cpu_loading] cur_idle_time[2].time:917091836 cur_wall_time[2].time:1008009946*/0)               |  /* 6 [cpu_loading] cur_idle_time[3].time:890438730 cur_wall_time[3].time:1008009950*/0)               |  /* 6 [cpu_loading] cur_idle_time[0].time:933317139 cur_wall_time[0].time:1008009932*/0)               |  /* 6 [cpu_loading] cur_idle_time[1].time:936071150 cur_wall_time[1].time:1008009942*/0)               |  /* 6 [cpu_loading] cur_idle_time[2].time:917091836 cur_wall_time[2].time:1008009946*/0)               |  /* 6 [cpu_loading] cur_idle_time[3].time:890438730 cur_wall_time[3].time:1008009950*/0)               |  /* 6 [cpu_loading] tmp_cpu_loading:2 prev_cpu_loading:1 previous state:3*/0)               |  /* 6 [cpu_loading] sent uevent success:lower2 */0)               |  /* 6 [cpu_loading] current state:3*/0)               |  /* 6 [cpu_loading] enable timer */1)   1.462 us    |  touch_atime();1)   0.616 us    |  touch_atime();1)   0.385 us    |  touch_atime();1)   0.538 us    |  touch_atime();1)   0.539 us    |  touch_atime();1)   1.461 us    |  touch_atime();1)   0.308 us    |  touch_atime();1)   0.385 us    |  touch_atime();1)   0.385 us    |  touch_atime();1)   2.000 us    |  touch_atime();1)   0.923 us    |  touch_atime();1)   0.615 us    |  touch_atime(); xxx:/sys/kernel/debug/tracing # 通过该文件还可以指定属于特定模块的函数这要用到 mod 指令。指定模块的格式为echo :mod:[module_name]  set_ftrace_filter 查看对应的内核模块xxx:/sys/kernel/debug/tracing # cat /proc/devices Character devices:1 mem2 pty3 ttyp4 ttyS5 /dev/tty5 /dev/console5 /dev/ptmx10 misc13 input14 sound29 fb 使用过滤器只针对某个模块进行跟踪xxx:/sys/kernel/debug/tracing # echo :mod:sound  set_ftrace_filter 1|xxx:/sys/kernel/debug/tracing # 需要注意的是这三种形式不能组合使用比如“beginmiddleend”实际的效果与“begin”相同。另外使用通配符表达式时需要用单引号将其括起来如果使用双引号shell 可能会对字符‘ * ’进行扩展这样最终跟踪的对象可能与目标函数不一样。4.参考资料[1]、 https://lwn.net/Articles/365835/[2]、https://www.kernel.org/doc/Documentation/trace/ftrace.txt推荐阅读专辑|Linux文章汇总专辑|程序人生专辑|C语言我的知识小密圈
http://www.yutouwan.com/news/214279/

相关文章:

  • 网站没收录要怎么做sketch网站花边怎么做
  • h5建设网站竞价推广课程
  • 网站多久被百度收录培训机构在哪个平台找
  • wampserver网站开发步骤海珠网站建设公司
  • asp.net做简易网站网站建设公司有哪些原
  • 河北城乡建设厅网站显示不全西安汽车网站制作
  • 黄冈网站官方登录平台广州网站建设业务
  • 全国可信网站如何做简单网站首页
  • 网站解析后163公司企业邮箱
  • 英文网站建设成都桔子建站官网
  • 网站适配手机成都房建设部网站
  • 咸阳哪里做网站比较好的做外贸网站
  • 济南企业营销型网站建设网络营销的特点包括哪些?
  • 如何给别人做网站挣钱wordpress 要求php版本
  • 公司网站建设解决方案网站推广有哪些常用的方法
  • 桂平网站设计网络运营商架构
  • 做网站首先要干什么建和做网站
  • 罗湖附近公司做网站建设哪家服务周到电子商务网站搭建方案
  • 建设部网站注册查询百度指数关键词工具
  • 品牌网站建设服务网站建设质量管理定义
  • 做国内贸易的网站wordpress与drupal
  • html5手机网站开发区别怎么做淘宝劵网站
  • 泰州网站制作计划外贸高端网站设计
  • vue手机网站开发普通人做电商要多少钱
  • 群辉做网站服务器刷单类网站开发
  • 自己做的网站怎么改电话wordpress不能编辑
  • 达令的网站建设做外贸都用什么网站
  • 建设银行网站扫码支付在哪里3d效果图什么网站做的好
  • 济南专业网站优化做1688网站到哪里找图片
  • 网站如何做品牌宣传有免费开网店的吗