mirror of
https://github.com/ocaml-tracing/ocaml-trace.git
synced 2026-03-08 03:47:57 -04:00
add perfetto with single .proto file, parts of it commented
we only want to encode data, and only part of it, so we can skip some java-specific messages, as well as the whole Ftrace subsystem.
This commit is contained in:
parent
15edb582d0
commit
5e69650534
8 changed files with 94602 additions and 0 deletions
3
Makefile
3
Makefile
|
|
@ -14,6 +14,9 @@ test-autopromote:
|
|||
doc:
|
||||
@dune build $(DUNE_OPTS) @doc
|
||||
|
||||
genproto:
|
||||
FORCE_GENPROTO=true dune build @lint --auto-promote
|
||||
|
||||
WATCH?= @install @runtest
|
||||
watch:
|
||||
dune build $(DUNE_OPTS) -w $(WATCH)
|
||||
|
|
|
|||
19
dune-project
19
dune-project
|
|
@ -94,4 +94,23 @@
|
|||
(tags
|
||||
(trace tracing fuchsia)))
|
||||
|
||||
|
||||
(package
|
||||
(name trace-perfetto)
|
||||
(synopsis
|
||||
"A backend for trace based on perfetto's protobuf format")
|
||||
(depends
|
||||
(ocaml
|
||||
(>= 4.08))
|
||||
(trace
|
||||
(= :version))
|
||||
(mtime
|
||||
(>= 2.0))
|
||||
(thread-local-storage
|
||||
(>= 0.2))
|
||||
pbrt
|
||||
dune)
|
||||
(tags
|
||||
(trace tracing perfetto)))
|
||||
|
||||
; See the complete stanza docs at https://dune.readthedocs.io/en/stable/dune-files.html#dune-project
|
||||
|
|
|
|||
6
src/perfetto/README.md
Normal file
6
src/perfetto/README.md
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
|
||||
## NOTES
|
||||
|
||||
- to generate, `make genproto` in root directory. Pay attention to the version of `ocaml-protoc`.
|
||||
- we commented some parts that are not really relevant to reduce the size of the code.
|
||||
|
||||
25
src/perfetto/dune
Normal file
25
src/perfetto/dune
Normal file
|
|
@ -0,0 +1,25 @@
|
|||
|
||||
(library
|
||||
(name trace_perfetto)
|
||||
(public_name trace-perfetto)
|
||||
(synopsis
|
||||
"A high-performance backend for trace, emitting a Fuchsia trace into a file")
|
||||
(libraries
|
||||
trace.core
|
||||
trace.private.util
|
||||
trace.subscriber
|
||||
thread-local-storage
|
||||
mtime
|
||||
mtime.clock.os
|
||||
pbrt
|
||||
))
|
||||
|
||||
(rule
|
||||
(alias lint)
|
||||
(mode promote)
|
||||
(enabled_if %{env:FORCE_GENPROTO=false})
|
||||
(targets perfetto_trace.ml perfetto_trace.mli)
|
||||
(deps
|
||||
(:file perfetto_trace.proto))
|
||||
(action
|
||||
(run ocaml-protoc %{file} --ml_out . --encode-only --pp --make --binary)))
|
||||
49960
src/perfetto/perfetto_trace.ml
Normal file
49960
src/perfetto/perfetto_trace.ml
Normal file
File diff suppressed because it is too large
Load diff
26819
src/perfetto/perfetto_trace.mli
Normal file
26819
src/perfetto/perfetto_trace.mli
Normal file
File diff suppressed because it is too large
Load diff
17734
src/perfetto/perfetto_trace.proto
Normal file
17734
src/perfetto/perfetto_trace.proto
Normal file
File diff suppressed because it is too large
Load diff
36
trace-perfetto.opam
Normal file
36
trace-perfetto.opam
Normal file
|
|
@ -0,0 +1,36 @@
|
|||
# This file is generated by dune, edit dune-project instead
|
||||
opam-version: "2.0"
|
||||
version: "0.10"
|
||||
synopsis: "A backend for trace based on perfetto's protobuf format"
|
||||
maintainer: ["Simon Cruanes"]
|
||||
authors: ["Simon Cruanes"]
|
||||
license: "MIT"
|
||||
tags: ["trace" "tracing" "perfetto"]
|
||||
homepage: "https://github.com/c-cube/ocaml-trace"
|
||||
bug-reports: "https://github.com/c-cube/ocaml-trace/issues"
|
||||
depends: [
|
||||
"ocaml" {>= "4.08"}
|
||||
"trace" {= version}
|
||||
"mtime" {>= "2.0"}
|
||||
"thread-local-storage" {>= "0.2"}
|
||||
"pbrt"
|
||||
"dune" {>= "2.9"}
|
||||
"odoc" {with-doc}
|
||||
]
|
||||
build: [
|
||||
["dune" "subst"] {dev}
|
||||
[
|
||||
"dune"
|
||||
"build"
|
||||
"-p"
|
||||
name
|
||||
"-j"
|
||||
jobs
|
||||
"--promote-install-files=false"
|
||||
"@install"
|
||||
"@runtest" {with-test}
|
||||
"@doc" {with-doc}
|
||||
]
|
||||
["dune" "install" "-p" name "--create-install-files" name]
|
||||
]
|
||||
dev-repo: "git+https://github.com/c-cube/ocaml-trace.git"
|
||||
Loading…
Add table
Reference in a new issue