Git Product home page Git Product logo

h2olog's People

Contributors

gfx avatar kazuho avatar spacewander avatar syohex avatar toru avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

h2olog's Issues

Implicit declaration of sprintf()

warning: implicitly declaring library function 'sprintf' with type 'int (char *, const char *, ...)' [-Wimplicit-function-declaration]

Reported on an older kernel. IIUC, it should be a matter of including the standard header file.

Generate QUIC tracer functions using C macros

BCC currently has a limitation where USDT reader funcs cannot be called from a static helper function (iovisor/bcc#1255). This makes it a little tricky to reduce the over-redundancy of the code. Therefore consider implementing a macro-based helper.

The ideal flow would be:

  1. read and parse quicly-probes.d
  2. call the macro with the probe name, field index, field name, and field type

Another huge benefit of this approach is that supporting future probes would become easy.

Better options for choosing what to trace

IIUC, h2o has two modes, identified by the special argument "quic." If set, it logs QUIC and HTTP events. If not, it logs HTTP events only. The limitation of the approach is that it is not capable of logging QUIC events only (therefore it cannot be used for tracing other applications using quicly). The other problem is that it does not trace TLS events.

I think that things would become clearer if there were three options to designate tracing at each layer. E.g., -H for HTTP-level tracing, -Q for QUIC level, -T for TLS-level.

logging both http- and quic-level events

At the moment, the command is capable of only logging either of the two at once. This prevents us from doing cross-layer analysis, e.g, looking into what HTTP response is sent on a particular QUIC STREAM frame.

I think we should simply log all the events regardless of the layer (e.g., provider in terms of USDT).

When emitting events from multiple providers to JSON, the event names can be prefixed by their prefixes (e.g., receive event of quicly provider becomes quicly_receive). Doing so would align the output to that generated by https://github.com/h2o/quicly/blob/master/misc/probe2trace.pl.

Autogenerate tracing code for HTTP (and TLS) probes too

At the moment, h2olog autogenerates tracing code only for QUIC-level probes.

It would be great if we could use that for HTTP- and TLS-level events too. To give an example, h3_packet_receive and h3_packet_forward are HTTP-level events that have been recently added to H2O. But neither of them are supported by h2olog.

Use bpf_probe_read instead of the _str variant

While bpf_probe_read_str is the correct function to use for our use-case, sadly the function doesn't exist on older kernels (< 4.11). Therefore use the widely available bpf_probe_read instead.

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.