Tag

Bytecode

1 views collected around this technical thread.

Architect
Architect
Jun 14, 2025 · Backend Development

Mastering Java Instrumentation: Non‑Intrusive Method Timing with Agents and Arthas

This article explains how to replace invasive manual timing code with Java Instrumentation, demonstrating both premain and agentmain approaches, building and attaching agents, using ASM and Bytekit for bytecode enhancement, and leveraging Arthas for runtime tracing and debugging.

ArthasBytecodeInstrumentation
0 likes · 22 min read
Mastering Java Instrumentation: Non‑Intrusive Method Timing with Agents and Arthas
Code Mala Tang
Code Mala Tang
Jun 8, 2025 · Fundamentals

Why Python’s a, b = b, a Isn’t Magic – The Real Mechanics Explained

This article demystifies Python’s a, b = b, a idiom by detailing how tuple packing and unpacking work, the exact evaluation order, the CPython bytecode implementation, comparisons with C, C++, Java, JavaScript, and the performance and memory implications of the technique.

BytecodePythonperformance
0 likes · 17 min read
Why Python’s a, b = b, a Isn’t Magic – The Real Mechanics Explained
Cognitive Technology Team
Cognitive Technology Team
May 13, 2025 · Fundamentals

An Introduction to SootUp: Static Analysis of JVM Code

This article introduces the SootUp library, explains how to configure its Maven dependencies, describes the Jimple intermediate representation, and demonstrates how to use SootUp's API to analyze Java source code, bytecode, and method bodies through a series of code examples.

BytecodeJVMJava
0 likes · 14 min read
An Introduction to SootUp: Static Analysis of JVM Code
DeWu Technology
DeWu Technology
Dec 9, 2024 · Fundamentals

Deadlock Caused by Do-While Loop in Plugin

A mobile app deadlock was traced to a do‑while loop introduced by a weaver plugin that concurrently copied method nodes, causing ASM label‑node mismatches; adding thread synchronization to the method‑cloning process resolved the issue and underscores the concurrency risks of bytecode instrumentation.

BytecodeDeadlockPlugin
0 likes · 10 min read
Deadlock Caused by Do-While Loop in Plugin
Architect
Architect
Nov 19, 2024 · Backend Development

Java Agent and Instrumentation: Non‑Intrusive Method Timing, Attach API, and Arthas Trace

This article demonstrates how to replace invasive manual timing code with Java Agent‑based instrumentation, covering the use of java.lang.instrument, premain and agentmain methods, dynamic class retransformation via the Attach API, and practical examples including method‑level timing, runtime class modification, and integration with Arthas for tracing.

ArthasBytecodeInstrumentation
0 likes · 20 min read
Java Agent and Instrumentation: Non‑Intrusive Method Timing, Attach API, and Arthas Trace
Python Programming Learning Circle
Python Programming Learning Circle
Oct 31, 2024 · Fundamentals

Understanding Python Bytecode and Variable Assignment Mechanics

This article examines Python's bytecode instructions, explains how common operations like variable assignment, multiple assignment, and comparison are implemented at the interpreter level, and illustrates the underlying mechanisms with detailed code examples and disassembled bytecode.

BytecodeComparisonInterpreter
0 likes · 19 min read
Understanding Python Bytecode and Variable Assignment Mechanics
IT Services Circle
IT Services Circle
Oct 19, 2024 · Fundamentals

Understanding Python's Virtual Machine Execution and Runtime Stack

This article explains how the Python interpreter initializes its runtime environment, compiles source code into PyCodeObject bytecode, creates stack frames, and executes the bytecode using functions like PyEval_EvalFrame and _PyEval_EvalFrameDefault while detailing the role of the runtime stack and its associated C macros.

BytecodeC++Interpreter
0 likes · 21 min read
Understanding Python's Virtual Machine Execution and Runtime Stack
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Aug 29, 2024 · Backend Development

Understanding JavaAgent: Principles, Implementation, and a Practical Timing Example

This article explains the concept of JavaAgent, its underlying mechanism using the JVM instrumentation API, and provides a step‑by‑step guide with code samples to build a JavaAgent that measures method execution time in a Spring application.

BytecodeInstrumentationJava
0 likes · 9 min read
Understanding JavaAgent: Principles, Implementation, and a Practical Timing Example
DeWu Technology
DeWu Technology
Aug 26, 2024 · Fundamentals

Understanding Java's invokedynamic and Lambda Implementation

The article explains how Java’s invokedynamic instruction and LambdaMetafactory create synthetic classes and MethodHandles to implement Lambda expressions, detailing compilation steps, stateless versus stateful handling, performance implications, and the requirement for captured variables to be effectively final.

BytecodeJVMJava
0 likes · 16 min read
Understanding Java's invokedynamic and Lambda Implementation
Rare Earth Juejin Tech Community
Rare Earth Juejin Tech Community
Aug 7, 2024 · Backend Development

Understanding and Implementing JavaAgent for Runtime Instrumentation

This article explains the concept, architecture, and practical implementation of JavaAgent for Java runtime instrumentation, covering its role, premain method, ClassFileTransformer usage, bytecode manipulation with ASM or Javassist, and step‑by‑step guidance to build, package, and attach a JavaAgent for method execution time monitoring.

BytecodeClassFileTransformerInstrumentation
0 likes · 10 min read
Understanding and Implementing JavaAgent for Runtime Instrumentation
Python Programming Learning Circle
Python Programming Learning Circle
Apr 23, 2024 · Fundamentals

How to Decompile a Python .exe Back to Python Source Code

This guide explains how to extract .pyc files from a Python‑generated executable, restore missing bytecode headers, and use tools such as pyinstxtractor, pyi‑archive_viewer, and uncompyle6 to decompile the bytecode back into readable Python scripts while highlighting common pitfalls and protection mechanisms.

BytecodeExecutablePython
0 likes · 12 min read
How to Decompile a Python .exe Back to Python Source Code
Java Architect Essentials
Java Architect Essentials
Mar 4, 2024 · Fundamentals

Anonymous Inner Classes vs Lambda Expressions: Memory Leak Risks in Java

This article examines how anonymous inner classes and lambda expressions differ in their handling of outer class references, analyzes compiled bytecode to reveal potential memory leak risks, and demonstrates how explicit references affect lambda behavior in Java Android development.

AnonymousInnerClassBytecodeJava
0 likes · 9 min read
Anonymous Inner Classes vs Lambda Expressions: Memory Leak Risks in Java
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Feb 5, 2024 · Fundamentals

How V8 Implements JavaScript Closures

V8 creates JavaScript closures by lazily parsing functions, using a pre‑parser to detect and record outer‑variable references, copying captured values to the heap, then generating bytecode that builds a function context and closure, ensuring efficient execution while avoiding memory‑leak pitfalls.

BytecodeClosuresEngine Internals
0 likes · 16 min read
How V8 Implements JavaScript Closures
NetEase Cloud Music Tech Team
NetEase Cloud Music Tech Team
Jan 24, 2024 · Mobile Development

Optimizing Hermes Bytecode Bundle Size and SourceMap Handling in React Native

To counter the 40‑100 % size increase of Hermes bytecode bundles after upgrading to React Native 0.70, the team switched to xz compression (cutting zip size 20‑26 %), enabled hermesc ‑O optimization (shrinking bundles 10‑22 % while requiring a two‑step source‑map merge), and used the ‑base‑bytecode option with bsdiff to reduce incremental OTA patches by up to 85 %, collectively improving download and update efficiency.

BytecodeHermesIncremental Update
0 likes · 13 min read
Optimizing Hermes Bytecode Bundle Size and SourceMap Handling in React Native
Selected Java Interview Questions
Selected Java Interview Questions
Jan 5, 2024 · Backend Development

Do Lambda Expressions Cause Memory Leaks Like Anonymous Inner Classes in Java?

This article analyzes whether Java lambda expressions can lead to memory leaks similar to anonymous inner classes by comparing their compiled bytecode, demonstrating that lambdas only retain a reference to the outer class when they explicitly capture its members.

Anonymous Inner ClassBytecodeJava
0 likes · 8 min read
Do Lambda Expressions Cause Memory Leaks Like Anonymous Inner Classes in Java?
政采云技术
政采云技术
Dec 26, 2023 · Backend Development

Understanding Java Bytecode and Using ASM for Bytecode Manipulation

This article explains how Java achieves "write once, run anywhere" through platform‑independent bytecode, describes the .class file structure, introduces tools for viewing bytecode, and provides detailed guidance on using the ASM library’s Core and Tree APIs for bytecode enhancement, including practical code demos and application scenarios.

ASMBytecodeBytecode Manipulation
0 likes · 16 min read
Understanding Java Bytecode and Using ASM for Bytecode Manipulation
Top Architecture Tech Stack
Top Architecture Tech Stack
Nov 24, 2023 · Backend Development

Applying ASM Bytecode Manipulation in cglib and Fastjson

This article demonstrates how ASM is used to generate dynamic proxies with cglib and to create high‑performance JSON deserializers in Fastjson, providing code examples, explanation of the underlying bytecode generation, and practical tips for developers.

ASMBytecodeCglib
0 likes · 8 min read
Applying ASM Bytecode Manipulation in cglib and Fastjson
JD Retail Technology
JD Retail Technology
Nov 22, 2023 · Fundamentals

Understanding Java Class File Structure and JVM Execution Process

This article explains the Java class file format, including its magic number, version, constant pool, access flags, fields, methods, and attributes, and then details how the JVM loads, verifies, prepares, resolves, and initializes classes, manages object memory layout, and executes bytecode using a stack‑based interpreter.

BytecodeClassFileJVM
0 likes · 21 min read
Understanding Java Class File Structure and JVM Execution Process
Full-Stack Internet Architecture
Full-Stack Internet Architecture
Nov 20, 2023 · Backend Development

Using Javaassist for Bytecode Manipulation: Creating, Modifying, and Enhancing Java Classes

This article introduces Javaassist, a Java library for runtime bytecode manipulation, and demonstrates how to view compiled bytecode, add Maven dependencies, generate new classes, modify existing ones, insert fields and methods, and apply AOP‑style enhancements without changing source code.

AOPBytecodeCode Generation
0 likes · 6 min read
Using Javaassist for Bytecode Manipulation: Creating, Modifying, and Enhancing Java Classes