I hereby claim:
- I am deanberris on github.
- I am deanberris (https://keybase.io/deanberris) on keybase.
- I have a public key ASApb4DM6eaITms9gQZGD-RZ0o-LGkvW-u0dpPgYXYBvngo
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
I hereby claim:
To claim this, I am signing this object:
set -x | |
# Step 1: Build a clang using the system compiler that can build with XRay instrumentation. | |
mkdir llvm-build | |
cd llvm-build | |
cmake -GNinja \ | |
-DLLVM_ENABLE_PROJECTS="clang:compiler-rt" \ | |
-DCMAKE_BUILD_TYPE=Release ../llvm-project/llvm | |
ninja clang # Probably get a beverage and/or watch some videos | |
.section __TEXT,__text,regular,pure_instructions | |
.globl _callee | |
.p2align 4, 0x90 | |
_callee: ## @callee | |
.cfi_startproc | |
## BB#0: | |
.p2align 1, 0x90 | |
Lxray_sled_0: | |
.ascii "\353\t" | |
nopw 512(%rax,%rax) |
.p2align 4, 0x90 | |
.quad Lxray_synthetic_0 | |
.quad Lxray_fn_idx_synth_0 |
#include <iostream> | |
#include <memory> | |
#include <vector> | |
#include <utility> | |
/* Same definition of Object, Book, and Door as before */ | |
class object_concept_t { | |
public: | |
virtual ~object_concept_t() = default; |
#include <iostream> | |
class Book { | |
std::string author, title; | |
public: | |
Book(std::string const &author, std::string const &title) | |
: author{author}, title{title} | |
{} | |
Book(Book const &other) : author{other.author}, title{other.title} {} | |
Book() : author{}, title{} {} |
#include <iostream> | |
class Object { | |
std::string type_name; | |
protected: | |
explicit Object(std::string const& type_name) : type_name{type_name} {} | |
public: | |
Object() : type_name{"Object"} {} | |
Object(Object const &other) : type_name{other.type_name} {} | |
virtual void print() { std::cout << type_name; } |
namespace http = network::http; | |
namespace util = network::util; | |
http::client client; | |
auto fr = client.get( | |
{"https://www.myservice.com/", | |
util::gzip_encode(new file_byte_source{"/tmp/data"})} | |
); // we're gzip encoding the request body | |
auto r = fr.get(); | |
std::string data = r.read(getpagesize()).get(); | |
while (!data.empty()) { |
namespace http = network::http; | |
std::future<http::response> response_future = | |
client.get("http://www.google.com/"); // returns immediately | |
http::response actual_response = | |
response_future.get(); // will move instead of copy |