Go to file
Mike Klein 7760112e01 better perf support for JIT code
References:

   https://lwn.net/Articles/638566/
   https://v8.dev/docs/linux-perf
   https://cs.chromium.org/chromium/src/v8/src/diagnostics/perf-jit.cc
   https://lore.kernel.org/patchwork/patch/622240/

Usage:

    ninja -C out dm nanobench
    perf record -k 1 out/nanobench -m SkVM_4096_I32\$
    perf inject -j -i perf.data -o perf.data.jit
    perf report -i perf.data.jit

Percent│
       │
       │
       │    Disassembly of section .text:
       │
       │    0000000000000040 <skvm-jit-8e8f2c67>:
       │    skvm-jit-8e8f2c67():
       │      vbroadcastss 0xd3(%rip),%ymm0        # 11c <skvm-jit-8e8f2c67+0xdc>
  0.35 │ 9:   vmovups (%rsi),%ymm1
  1.54 │      vandps %ymm0,%ymm2,%ymm2
  3.41 │      vpsrld $0x8,%ymm1,%ymm3
  0.26 │      vandps %ymm0,%ymm3,%ymm3
  0.55 │      vpsrld $0x10,%ymm1,%ymm4
  1.63 │      vandps %ymm0,%ymm4,%ymm4
  2.84 │      vpsrld $0x18,%ymm1,%ymm1
  0.46 │      vandps %ymm0,%ymm1,%ymm1
  0.17 │      vmovups (%rdx),%ymm5
  1.51 │      vandps %ymm0,%ymm6,%ymm6
  3.31 │      vpsrld $0x8,%ymm5,%ymm7
  0.38 │      vandps %ymm0,%ymm7,%ymm7
  0.28 │      vpsrld $0x10,%ymm5,%ymm8
  2.30 │      vandps %ymm0,%ymm8,%ymm8
  3.32 │      vpsrld $0x18,%ymm5,%ymm5
  0.47 │      vandps %ymm0,%ymm5,%ymm5
  0.64 │      vpsubd %ymm1,%ymm0,%ymm9
 12.49 │      vpmulld %ymm9,%ymm6,%ymm6
  1.19 │      vpaddd %ymm6,%ymm6,%ymm6
  8.75 │      vpsrad $0x8,%ymm6,%ymm6
  1.40 │      vpaddd %ymm2,%ymm6,%ymm6
  1.42 │      vpmulld %ymm9,%ymm7,%ymm7
  4.06 │      vpaddd %ymm7,%ymm7,%ymm7
  2.55 │      vpsrad $0x8,%ymm7,%ymm7
  2.14 │      vpaddd %ymm3,%ymm7,%ymm7
  2.57 │      vpmulld %ymm9,%ymm8,%ymm8
  1.28 │      vpaddd %ymm8,%ymm8,%ymm8
  2.85 │      vpsrad $0x8,%ymm8,%ymm8
  0.41 │      vpaddd %ymm4,%ymm8,%ymm8
  2.52 │      vpmulld %ymm9,%ymm5,%ymm9
  3.88 │      vpaddd %ymm5,%ymm9,%ymm9
  1.90 │      vpsrad $0x8,%ymm9,%ymm9
  2.83 │      vpaddd %ymm1,%ymm9,%ymm9
  1.43 │      vpslld $0x8,%ymm7,%ymm7
  4.35 │      vorps  %ymm6,%ymm7,%ymm7
  3.08 │      vpslld $0x8,%ymm9,%ymm9
  1.71 │      vorps  %ymm8,%ymm9,%ymm9
  3.58 │      vpslld $0x10,%ymm9,%ymm9
  3.37 │      vorps  %ymm7,%ymm9,%ymm9
  1.01 │      vmovups %ymm9,(%rdx)
  0.37 │      sub    $0x8,%rdi
  1.73 │      add    $0x20,%rsi
  3.27 │      add    $0x20,%rdx
       │      cmp    $0x7,%rdi
  0.40 │    ↑ jg     9
       │      vzeroupper
  0.05 │    ← retq
       │      xchg   %ax,%ax
       │      incl   (%rax)
       │            ...

Change-Id: Ibac83c92748139f7579c198ff09edf5564d2138e
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/220316
Reviewed-by: Herb Derby <herb@google.com>
Commit-Queue: Mike Klein <mtklein@google.com>
2019-06-11 19:30:49 +00:00
animations first cut at a checkbox 2009-10-21 19:41:10 +00:00
bench Reland "SkParagraph" 2019-06-11 17:20:36 +00:00
bin Add bin/try-clients to trigger client tryjobs 2019-06-11 16:55:53 +00:00
dm Make color initialization version of createBackendTexture public 2019-06-04 20:12:22 +00:00
docker Include wasm debugger in continuous build part 2 2019-04-01 19:51:43 +00:00
docs/examples PDF example 2019-05-28 17:21:59 +00:00
example Use SkTextEncoding enum instead of macros. 2019-05-07 20:54:16 +00:00
experimental Revert "try resolver pattern" 2019-06-11 16:01:14 +00:00
fuzz Make fuzzing use embedded test font 2019-06-03 16:29:21 +00:00
gm Initial implementation of SkSurface::asyncRescaleAndReadPixelsYUV420. 2019-06-11 16:04:03 +00:00
gn third-party.gni: Search includes using -I. 2019-06-11 19:04:29 +00:00
include Initial implementation of SkSurface::asyncRescaleAndReadPixelsYUV420. 2019-06-11 16:04:03 +00:00
infra Increase timeout for G3 framework bot 2019-06-11 18:48:09 +00:00
modules Reland "SkParagraph" 2019-06-11 17:20:36 +00:00
platform_tools rewrite includes to not need so much -Ifoo 2019-04-24 16:27:11 +00:00
resources [skottie] Animated text tracking support 2019-06-11 13:41:28 +00:00
samplecode Reland "SkParagraph" 2019-06-11 17:20:36 +00:00
site fix up relative links and spacing 2019-06-11 14:29:38 +00:00
specs [img-decode] Start on proposed new spec 2019-05-06 17:39:19 +00:00
src better perf support for JIT code 2019-06-11 19:30:49 +00:00
tests Reland "SkParagraph" 2019-06-11 17:20:36 +00:00
third_party third-party.gni: Search includes using -I. 2019-06-11 19:04:29 +00:00
tools Use new retain() method to set up window context. 2019-06-11 13:08:58 +00:00
.clang-format restore .clang-format 2019-03-21 15:52:32 +00:00
.clang-tidy add google-build-namespaces to clang-tidy checks 2018-12-12 16:33:59 +00:00
.gitignore clean up some .gitignores 2019-05-15 19:55:45 +00:00
.gn Basic standalone GN configs. 2016-07-21 12:25:45 -07:00
AUTHORS third-party.gni: Search includes using -I. 2019-06-11 19:04:29 +00:00
BUILD.gn add basic JIT using xbyak 2019-06-11 18:40:39 +00:00
codereview.settings Make uploading to Gerrit the default for Skia 2016-11-09 19:07:56 +00:00
CONTRIBUTING Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
CQ_COMMITTERS Moved committer list to chrome-infra-auth and deleted it from the repo 2015-09-02 13:37:54 -07:00
DEPS add basic JIT using xbyak 2019-06-11 18:40:39 +00:00
go.mod [infra] Pin infra code using Go modules 2019-05-06 17:53:19 +00:00
go.sum [infra] Pin infra code using Go modules 2019-05-06 17:53:19 +00:00
LICENSE BUG=skia:5602 2016-09-02 11:19:34 -07:00
OWNERS add OWNERS file 2017-12-01 19:50:19 +00:00
PRESUBMIT.py add mtklein to api approvals 2019-04-02 15:16:56 +00:00
public.bzl Adding skparagraphto public.bzl 2019-06-10 15:48:14 +00:00
README Fix references to https://sites.google.com/site/skiadocs/. 2015-02-03 13:12:54 -02:00
README.chromium Update README.chromium. 2015-06-11 13:19:24 -07:00
whitespace.txt Whitespace test 2019-05-18 13:05:29 +00:00

Skia is a complete 2D graphic library for drawing Text, Geometries, and Images.

See full details, and build instructions, at https://skia.org.