File: truffleruby.rb

package info (click to toggle)
ruby-stackprof 0.2.26-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 552 kB
  • sloc: python: 2,494; ruby: 1,264; perl: 920; ansic: 761; javascript: 735; makefile: 4
file content (37 lines) | stat: -rw-r--r-- 652 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
module StackProf
  # Define the same methods as stackprof.c
  class << self
    def running?
      false
    end

    def run(*args)
      unimplemented
    end

    def start(*args)
      unimplemented
    end

    def stop
      unimplemented
    end

    def results(*args)
      unimplemented
    end

    def sample
      unimplemented
    end

    def use_postponed_job!
      # noop
    end

    private def unimplemented
      raise "Use --cpusampler=flamegraph or --cpusampler instead of StackProf on TruffleRuby.\n" \
            "See https://www.graalvm.org/tools/profiling/ and `ruby --help:cpusampler` for more details."
    end
  end
end