Skip to content

Instantly share code, notes, and snippets.

Avatar
💭
I may be slow to respond.

Dan Glastonbury djg

💭
I may be slow to respond.
View GitHub Profile
View bad.txt
0:02.19 INFO Checking for ssltunnel processes...
0:02.22 INFO Checking for xpcshell processes...
0:02.25 SUITE_START: mochitest-plain - running 1 tests
0:02.25 INFO Running manifest: dom/tests/mochitest/general/mochitest.ini
pk12util: PKCS12 IMPORT SUCCESSFUL
0:02.54 INFO MochitestServer : launching [u'/home/djg/Mozilla/obj-ff-dbg.noindex/dist/bin/xpcshell', '-g', u'/home/djg/Mozilla/obj-ff-dbg.noindex/dist/bin', '-f', u'/home/djg/Mozilla/obj-ff-dbg.noindex/dist/bin/components/httpd.js', '-e', "const _PROFILE_PATH = '/tmp/tmpgIcAQ6.mozrunner'; const _SERVER_PORT = '8888'; const _SERVER_ADDR = '127.0.0.1'; const _TEST_PREFIX = undefined; const _DISPLAY_RESULTS = true;", '-f', '/home/djg/Mozilla/obj-ff-dbg.noindex/_tests/testing/mochitest/server.js']
0:02.54 INFO runtests.py | Server pid: 1441114
0:02.56 INFO runtests.py | Websocket server pid: 1441117
0:02.58 INFO runtests.py | SSL tunnel pid: 1441120
0:02.94 INFO runtests.py | Running with scheme: http
View a2w.html
<html>
<head>
<style>
table {
display: inline-grid;
grid: auto / repeat(32, 1fr);
width: 100%;
border-collapse: collapse;
font-family: "Arial";
font-style: normal;
@djg
djg / task_system.cpp
Created Mar 3, 2020
Sean Parent - OKish Task System with Task Stealing in C++14
View task_system.cpp
/* Horrible task system - task stealing */
#include <atomic>
#include <condition_variable>
#include <deque>
#include <functional>
#include <mutex>
#include <thread>
#include <vector>
using namespace std;
@djg
djg / task_system.cpp
Created Mar 3, 2020
Sean Parent Horribly Performing Task System - Queue per Thread
View task_system.cpp
/* Horrible task system - queue per thread */
#include <atomic>
#include <condition_variable>
#include <deque>
#include <functional>
#include <mutex>
#include <thread>
#include <vector>
using namespace std;
@djg
djg / task_system.cpp
Created Mar 3, 2020
Sean Parent Horribly Performing Task System in C++14
View task_system.cpp
/* Horrible task system */
#include <condition_variable>
#include <deque>
#include <functional>
#include <mutex>
#include <thread>
#include <vector>
using namespace std;
View gist:79f583cee896be982b685815b01de2a2
Clone https://github.com/acreskeyMoz/browsertime_on_android_scripts
Apply https://paste.mozilla.org/7D9vJ6qV to `mozilla-central`
Download APKs:
Fennec: archive.mozilla.org/pub/mobile/releases/68.3.0/android-aarch64/multi/fennec-68.3.0.multi.android-aarch64.apk
Fenix: https://firefox-ci-tc.services.mozilla.com/api/index/v1/task/project.mobile.fenix.v2.fennec-production.2020.02.08.latest/artifacts/public/build/arm64-v8a/geckoBeta/target.apk
Geckodriver: https://github.com/mozilla/geckodriver/releases/download/v0.26.0/geckodriver-v0.26.0-macos.tar.gz
Customize run_android.py
Apply sites.txt.weekly to ~/Mozilla/browsertime_on_android_scripts/sites.txt
./mach browsertime --setup
./mach browsertime --script ../browsertime_on_android_scripts/run_android.py
View LLC Misses
0.17 │ xor ebp,ebp ▒
1.77 │ nop ▒
6.54 │150:┌─→cmp r12,rbp ▒
│ │↓ je 170 ▒
│ │_ZN4core4iter8adapters13copy_try_fold28_$u7b$$u7b$closure$u7d$$u7d$17h5801f96c3ce42993E(): ▒
1.49 │ │ mov edi,DWORD PTR [r9+rbp*1]
@djg
djg / alu.rs
Created Aug 16, 2019
Proposed FHDL in Rust
View alu.rs
struct Alu {
pub sel: Signal,
pub a: Signal,
pub b: Signal,
pub o: Signal,
pub co: Signal,
}
impl Alu {
#[fhdl]
@djg
djg / alu.rs
Created Aug 16, 2019
Proposed FHDL in Rust
View alu.rs
struct Alu {
pub sel: Signal,
pub a: Signal,
pub b: Signal,
pub o: Signal,
pub co: Signal,
}
impl Alu {
#[fhdl]
View nsRefreshDriver.cpp
void nsRefreshDriver::Tick(VsyncId aId, TimeStamp aNowTime) {
MOZ_ASSERT(!nsContentUtils::GetCurrentJSContext(),
"Shouldn't have a JSContext on the stack");
if (nsNPAPIPluginInstance::InPluginCallUnsafeForReentry()) {
NS_ERROR("Refresh driver should not run during plugin call!");
// Try to survive this by just ignoring the refresh tick.
return;
}
You can’t perform that action at this time.