Giter VIP home page Giter VIP logo

ljstack's Introduction

ljstack

Build Status license

ljstack是一个能够对luajit2.1进程进行profile的工具,同时也是一个库。

优势

性能相当高,可以在线上开启,目标进程性能损失低于2%。

其他说明

ptrace

这个问题在CLion的帮助文档里有说明,为了避免ptrace失败,可以sudo执行进程,或者是执行如下命令:

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

为了能够持久生效,建议修改配置,打开/etc/sysctl.d/10-ptrace.conf,然后把kernel.yama.ptrace_scope的值改成0。 保存后再执行:

echo 0 | sudo tee /proc/sys/kernel/yama/ptrace_scope

luajit版本

默认情况下,支持luajit的2.0以及2.1的32位版本。

如果要支持luajit的2.1的64位版本,需要在cmake生成makefile的时候,执行:

cmake .. -DLJ_GC64

luajit的符号表

默认情况下,luajit在编译的时候指定了参数,取出了部分符号,导致ljstack无法获取到符号以及对应的地址。

缺失符号表,会造成profile无法进行。

为了避免这个问题,有两种办法:

  • 使用Debug模式编译luajit
  • 修改MakeFile

修改MakeFile,需要在MakeFile中添加:

TARGET_STRIP= @:

如下图:

ljstack's People

Contributors

bbkgl avatar

Stargazers

 avatar  avatar

Watchers

James Cloos avatar

Forkers

ajunlonglive

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.