Skip to content

Instantly share code, notes, and snippets.

View jryans's full-sized avatar

J. Ryan Stinnett jryans

View GitHub Profile
@jryans
jryans / line-table-coverage.md
Last active November 13, 2024 17:50
Measuring the line table's coverage in isolation

Measuring the line table's coverage in isolation

(This is additional detail for one of two metrics in a recent LLVM RFC. The ideas here were proposed by Stephen Livermore-Tozer.)

In addition to a variable coverage metric (described in our RFC elsewhere), we also plan to measure per-variable line table coverage as well. This is particularly useful for disambiguating cases where the above variable coverage metric shows less than 100% coverage. By also checking line table coverage for the same variable, it becomes clear whether the missing variable coverage is due to source lines missing from the line table or instructions missing from variable location ranges.

For the variable v and build configuration o, we have S(v) is the set of source lines in v's scope at which it is defined, and B(o,v) is the subset of S(v) at which v has a value described by debug info when built with o. Our per-variable coverage metric is then

C(o,v) = |B(o,v)| / |S(v)|

@jryans
jryans / recapture.js
Last active May 19, 2021 21:19
Zotero: Recapture web snapshot
var search = new Zotero.Search();
search.addCondition('itemType', 'is', 'webpage');
var itemIDs = await search.search();
var items = await Zotero.Items.getAsync(itemIDs);
var itemsByAttachmentCount = {};
for (let item of items) {
var attachments = item.getAttachments();
if (!itemsByAttachmentCount[attachments.length]) {
var req = indexedDB.open("matrix-js-sdk:crypto", 7);
req.onerror = console.error;
req.onsuccess = e => {
const db = e.target.result;
db.transaction("inbound_group_sessions").objectStore("inbound_group_sessions")
.count().onsuccess = e => console.log(e.target.result);
db.close();
};
commit aa1a809e3a474ea789eddd6977fa1b20d7ff38d7
Author: J. Ryan Stinnett <[email protected]>
Date: Mon Jul 16 18:01:44 2018 -0500
Handle navigation away from privileged content process in RDM
diff --git a/devtools/client/responsive.html/browser/swap.js b/devtools/client/responsive.html/browser/swap.js
index 863101963ee0a..e7e5b75f16514 100644
--- a/devtools/client/responsive.html/browser/swap.js
+++ b/devtools/client/responsive.html/browser/swap.js
diff --git a/layout/style/ServoBindingList.h b/layout/style/ServoBindingList.h
index 8e424f8..7ab43fa 100644
--- a/layout/style/ServoBindingList.h
+++ b/layout/style/ServoBindingList.h
@@ -39,17 +39,17 @@ SERVO_BINDING_FUNC(Servo_StyleSheet_HasRules, bool,
SERVO_BINDING_FUNC(Servo_StyleSheet_GetRules, ServoCssRulesStrong,
RawServoStyleSheetContentsBorrowed sheet)
SERVO_BINDING_FUNC(Servo_StyleSheet_Clone, RawServoStyleSheetContentsStrong,
RawServoStyleSheetContentsBorrowed sheet,
const mozilla::ServoStyleSheet* reference_sheet);
commit a58feeaa836675201a4e33af8355e921ec8ae9a2
Author: J. Ryan Stinnett <[email protected]>
Date: Wed Jul 26 15:25:42 2017 -0500
Revert "Bug 1381993 - Position the stop/reload animation using absolute positioning to make sure that the animation remains vertically centered even when non-default font sizes are used. r=Gijs"
This reverts commit b7ac898f7fbe7261385e3e111bcb1704da2bc4bc.
MozReview-Commit-ID: JFMhIFPs15G
@jryans
jryans / .mozconfig
Created May 13, 2017 04:13
.mozconfig for Gecko release, Rust debug
ac_add_options --enable-stylo
# These two are already the default, but who knows what else is in your .mozconfig
ac_add_options --disable-debug
ac_add_options --enable-optimize
ac_add_options --enable-rust-debug
@jryans
jryans / .mozconfig
Created April 20, 2016 15:00
Windows x64 Debug .mozconfig
# Compiler Flags
ac_add_options --target=x86_64-pc-mingw32
ac_add_options --host=x86_64-pc-mingw32
# objdir
mk_add_options MOZ_OBJDIR=@TOPSRCDIR@/obj-firefox-debug
# Make Options
# Application
# HG changeset patch
# User J. Ryan Stinnett <[email protected]>
Force about:devtools-toolbox into child process
MozReview-Commit-ID: HXU7HSCo2jU
diff --git a/browser/installer/package-manifest.in b/browser/installer/package-manifest.in
index d45c3cc..d20926b 100644
--- a/browser/installer/package-manifest.in
@jryans
jryans / gist:5c70a77c7cacc21fc0c1
Created January 11, 2016 21:10
Console output from /folder/everything
15:08:32.602 / UI Layout Callback Error
The west onresize_end callback is not a valid function. common.js:463:332
15:08:32.273 The resource at "https://ssl.google-analytics.com/ga.js" was blocked because tracking protection is enabled.[Learn More] everything
15:08:32.715 Array [ "correct?", Object, 0 ] common.js:1825:488
15:08:32.713 Use of getPreventDefault() is deprecated. Use defaultPrevented instead. common.js:120:468
15:08:37.639 Array [ "Setting refresh interval to every 1…" ] common.js:198:131
15:08:37.645 Array [ "Setting refresh interval to every 1…" ] common.js:198:131
15:08:36.899 The resource at "https://pbs.twimg.com/profile_images/454358640518914048/WX1xBTs9_normal.jpeg" was blocked because tracking protection is enabled.[Learn More] everything
15:08:36.911 The resource at "https://pbs.twimg.com/profile_images/474984180997046272/FJRmdbL4_normal.png" was blocked because tracking protection is enabled.[Learn More] everything
15:08:37.791 Array [ "Blank iframe, ignoring" ] common.js:1825:335